ActionScript 3.0 :: Loading External Assets + Multiple ApplicationDomains?

Sep 17, 2010

This is a follow-up to another thread that is getting wordy and unfocused:

[URL]

I am trying to load an external library .swf to use its embedded fonts, much like this method:

[URL]

However, the swf that is loading the font swf is loaded within a wrapper swf, and is defined as a separate ApplicationDomain as the wrapper.

Wrapper swf (app domain 1) <--- Player swf (app domain 2) <--- font library swf

The font is loading fine, and I'm even able to retrieve the font name (so I'm able to reference the object), but it is *not* showing up in the textfield as it should be.

When I remove the ApplicationDomain issue between wrapper and player swf by testing the player swf locally in the IDE (*not* loaded through the wrapper), it works fine. But I'm not sure how or why this is, because like I said, I'm able to get the font name so I'm able to reference it, it seems.

The TextField is being set to embedFonts, the font is loading, everything else seems to be working 100%, but there's some issue between the application domains that I just *can't* figure out.

View 14 Replies


Similar Posts:


ActionScript 3.0 :: Loading External Assets - Screen Stops Until The Loading Is Finished?

Oct 11, 2009

I have a movieclip clip that plays when the movie starts, the movieclip is a visual assets that show's that the application is loading some information but it's not showing any loading progress, just playing while the assets are loaded.I created a for loop that will load the assets using a simple loader, and then when the object is loaded the application push the object to an array.Problem is that when the loading starts all the animation that i have on screen stops until the loading is finished.The whole point is that the animation will play while it's loading.

View 10 Replies

Actionscript 3 :: Loading Assets From External Swf?

Aug 18, 2010

I am trying to load assets from an external swf. As in:

I drew a square in flash Made it into a symbol made sure to check the "Extract for Action Script" to doubly check I created an instance of it from within the asset file. went to my loader file loaded the assets.swf tried to find the class variable using "getDefininition" FAILED.

from what I'v been seeing from around the web the following code should work. (I actually copied it word for word from one of the tutorials) but it doesn't work.

import flash.system.ApplicationDomain;
import flash.display.MovieClip;
var myLoader:Loader = new Loader();

[Code]....

there should definately be class definition for XIconG though because I tried it myself from within the Asset.swf file. also I'm not sure whether this helps you, but when I tried to debug, I looked at the event.target.applicationDomain variable from the debugger menu and under it it said domainMemory = null. I don't have a clue why that is though.

View 1 Replies

ActionScript 3.0 :: External Assets - Multiple Loader Sprite Instance

Jul 27, 2010

I'm loading some external assets with the Loader class. I've done this a lot over the years, but seem to be coming across a problem I haven't had before. I want to display two instances on the stage at the same time of a .png I'm loading externally. If I use the Loader instance's contentLoaderInfo.content object in more than one sprite, the bitmap just "moves" from the first instantiated sprite to the second. I've tried duplicating the sprite with Senocular's duplicateDisplayObject class, but for some reason, it's not working right. But shouldn't I be able to use multiple instances of an imported bitmap like this just as if it were in the library of the .fla? If so, what do I need to do?

View 3 Replies

Professional :: Methods Used For Loading External Swfs And Assets?

Jun 29, 2010

My client wants to take all the Flash games on their website and put them on a portable device that's not connected to the internet. I need to make sure that the swfs are completely self contained, in that they do not require the internet to load any swfs or other assets. The client does not have any of the fla's, so my plan is to download the swf and decompile it with Sothink, and then search the AS for these methods:

URLRequest
loadMovie
loadMovieNum
 
If the search returns results then I'll assume the game is loading something and that game will not be used. The client doesn't want to put any development time into this, so it either goes on the portable as is or not at all.

View 6 Replies

ActionScript 3.0 :: Loading External Assets - Making Them Reusable

Aug 13, 2008

I've been using a fairly un-dynamic approach in AS3 as until now when it comes to loading assets, but now I'll be trying to adapting a current project to fit other clients with different needs which means I'll have to grab the bull by the horns. I have an XML with a list of images that will be used, which is reused multiple times in each project. So I'm wondering if there's a way to load an image using the loader-class, and making it reusable? Being able to attach said asset later to a placeholder inside a movieclip I have stored in the library would be ideal.

I managed to load it into a movieclip but duplicating it from there on was a bit of a headache, using an approach similar to this would be great(but I have personally no idea of how to implement it): [URL] Here's the current code I'm using, in case it helps understanding what I'm after(it's most likely really ugly compared to what you SHOULD be doing in as3):

[Code]...

View 3 Replies

ActionScript 3.0 :: Optimize Flash For Loading External Assets (videos/pictures)?

May 17, 2010

I'm loading a lot of external videos and pictures and I'm wondering what is the best way for handling the loaded videos and images. Should I unload them after they have finished playing and reload them whenever they are needed, or it's not required since they just use the clients memory and not the cpu cycles when inactive?

View 2 Replies

ActionScript 2.0 :: Pre-loading Multiple External Swf's?

Feb 12, 2008

I have a main swf file which has a container mc in which four separate swf files load into when called from four buttons (home, services, testimonials and contact). When the main swf file loads it calls the home.swf file as the default file to load in to the container.

The main swf has a preloader on the first two frames and so does the home.swf. When you view the main swf file the preloader plays fine, then the short intro animation which sets up the interface and then the home.swf's preloader kicks in and then the home.swf loads and animates in.

Right, for the problem...

I would like to incorporate the preloading of the home.swf file into the main.swf preloader (which has a simple percentage loaded text field) so when the short intro animation plays the home.swf file will load instantly without the need for another wait. Can this be done?

I am not a programmer and so all the answers I have found have either not been quite what I am looking for or way over my head - Is there an easy way of achieving this?

View 2 Replies

ActionScript 3.0 :: Loading Multiple External SWFs At Once?

Sep 23, 2009

I have a game which has various cutscenes. Each cutscene is split up into 3 or 4 seperate swf movie files which can be played (and replayed) by the user.

My question is, I've seen many tutorials on how to load external swfs but how do I load several movie clips into memory, and then clean everything up once the user has finished viewing them all?

View 2 Replies

Professional :: Loading Multiple External Images?

Oct 22, 2010

I have created invisible buttons which when clicked will load an image into a UILoader. When testing, an output error message comes up saying:

Error #2044: Unhandled ioError:. text=Error #2035: URL Not Found. URL: file:///E|/butcher1/images/cut0.jpg

I thought it might have been incorrect naming conventions or instance names but I have checked and I'm sure i've got it all right.
 
Could it possibly have something to do with my setup of the timeline as I have all my layers on the same line.
 
Should I start all over?

This is what some of the code looks like an i have done the same for the rest of the invisible buttons

this is what part of the code looks like...

cut7_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_3); function fl_MouseClickHandler_3(event:MouseEvent):void{ // Start your custom code // This example code displays the words "Mouse clicked" in the Output panel. trace("cut7_btn"); probackground.iloader.source = "images/cut7.jpg"; // End your custom code}

View 16 Replies

ActionScript 3.0 :: Loading Multiple MovieClips From One External SWF

Aug 26, 2009

I'm looking to setup a SWF to effectively act as a library of MovieClips. I'm looking to be able to load up the library SWF in my main SWF, and access the MovieClip's the library SWF contains - play them, move them around etc.

Here's the model I've come up with - which seems to work:

(a) Library SWF:

- Contains MovieClips, with AS3 code held in external files.

- MovieClips setup with linkage as "Export in first frame" and "Export for ActionScript"

[Code]....

... and this all seems to work. Nothing is displayed from the library SWF until I want it to - all seems fine.

Isn't it a bit naff needing all my library MovieClips sitting on the stage on the first frame on the library timeline?

View 5 Replies

ActionScript 3.0 :: Loading External SWF With Multiple Pages

Jun 19, 2010

I am trying to load an external swf with multiple pages so that I can print it in flash this is what I am doing:

Code:
function loadImage(url:String):void {
// Set properties on my Loader object
imageLoader = new Loader();
imageLoader.load(new URLRequest(url));
imageLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, imageLoading);
[Code] .....

I use the loadImage() function to load a multiframed swf movie then I use the function below to print but only one page comes out what am I doing wrong? How do I get it to print all the pages of the external swf?
Code:
function printScore(mc:MovieClip):void{
var myPrintJob:PrintJob = new PrintJob();
if(myPrintJob.start()) {
var printOptions = new PrintJobOptions(false);
[Code] .....
//Fail no printer

View 0 Replies

Actionscript 3.0 :: Loading Multiple External Txt File?

May 31, 2010

I'm trying to load multiple external txt files in different sections. Right now I only got the home section working and I'm trying to load another external txt file on the services section but it's not working.

View 1 Replies

ActionScript 3.0 :: Loading Multiple External Images

Aug 9, 2010

I've been racking my brain on this one and I just want to do something quite basic. I have 2 external images loading in my "Action" layer on the first frame. These load into movieclip containers which I want to tween / fade etc.The images load OK into the containers only when both motion tweens start at frame one. As soon as I move the 2nd image along the timeline the second image does not display (only the container rectangle tweens).If there is an easier way to do this then fantastic. for example should i use UIloader instead.I want to load multiple images and have them as a slideshow that moves.[code]

View 1 Replies

ActionScript 2.0 :: Loading Multiple External Swfs?

Aug 14, 2009

I can't figure out how to load external swf files(9) into my master.swf file one after the other. This is the Actionscript i have written so far.....(AS2)

Code:
var myItems:Array = new Array("swf01.swf", "swf02.swf", "swf03.swf", "swf04.swf", "swf05.swf", "swf06.swf", "swf07.swf", "swf08.swf", "swf09.swf");

[code].....

View 2 Replies

ActionScript 3.0 :: Preload Multiple Assets With One Progress Bar?

Apr 14, 2011

What's the best way to preload a bunch of assets (namely images) using only one progress bar?

Will the ProgressEvent automatically tally up the bytesLoaded and bytesTotal numbers for everything being loaded through that event?

View 3 Replies

ActionScript 2.0 :: Loading Multiple External Music Files?

Sep 4, 2010

I am working on a photo gallery with music and everything works good except I can not seem to load multiple music files one right after another. This is the code I have that works with one music file.

View 1 Replies

ActionScript 3.0 :: Loading Multiple External SWF Files In Sequence?

Dec 3, 2008

I have a fla file that I've created to load 7 external swf files. I am able to create the code to load one swf file without any trouble but I can't figure out the code to get it load swf #2 when #1 is done, and so on. My code for one is below:

[Code]...

I'm fairly new to AS3 but this seems like a pretty basic thing to do.

View 8 Replies

ActionScript 3.0 :: Loading Multiple External SWFs Within A Main Swf

Aug 31, 2009

I'm building a website that loads multiple swfs within one main swf. I would also like some swfs to unload when i click on the button situated on it. Currently I'm only able to load one swf with this code, can I somehow load more that just one swf by default? you can see the code below:

[Code]...

View 3 Replies

ActionScript 3.0 :: Loading And Playing Multiple External Swfs?

Jul 26, 2011

I have a main movie that sets up the loads of multiple swfs with:
 
/* imports */
import flash.net.URLRequest;
import flash.display.Loader;
import flash.utils.Timer;

[Code]....

How do I get it not just to start the move but play as well? Everything I tried caused an error or didn't work.

View 7 Replies

AS3 :: Flash - Loading Multiple External Images Into An Array?

Apr 2, 2011

Trying to pick 4 images randomly and load them into and array and then show them using a timer when all 4 images are shown 4 more images will be loaded again. here is the code:

var images : Array = new Array();
var rndNumbers : Array = new Array();
var imageLoader : Loader;

[code].....

View 1 Replies

ActionScript 3.0 :: Preloader Not Working With External Multiple Swf Loading?

Aug 31, 2010

My preloader works fine only for the first time, then after it not works ? I got 3 buttons on the stage which are calling 3 external swfs. I am getting this Error ?

ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display:: DisplayObjectContainer/removeChild()
at Design_fla::MainTimeline/finishLoading()

[Code].....

View 1 Replies

ActionScript 2.0 :: Loading Random External Swf - With Multiple Instances

Mar 2, 2007

I was wondering if there was a way to modify the current tutorial regarding "loading random movie clips from external swfs", into MC containers on the stage? I would like it to do the following

[Code]....

View 7 Replies

ActionScript 2.0 :: Loading Multiple External Movie Files?

Nov 15, 2007

I have been working on this script that currently loads 2 external files into two separate areas inside my application. the 2nd file loaded is supposed to have several buttons that control the 1st movie clip. Like go to next frame, etc. My problem now is the 2nd file loaded, is not controlling the 1st anymore ( i had this all sitting in one file before).

So the action script to load the files is;

Code:
this.myBtn.onRelease = function() {
//load render 1 into viewer
this._parent.viewer.createEmptyMovieClip("clipHold", this.getNextHighestDepth());

[Code]....

View 1 Replies

ActionScript 3.0 :: Flash Loading Multiple External Swfs?

Aug 8, 2011

ok using

Code:
var ldr:Loader = new Loader();
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded);

[Code]....

doesnt tell me the loaded files name nor does it tell me in currentTarget or Target.

View 2 Replies

ActionScript 2.0 :: Loading Text From Multiple External Sources?

May 20, 2004

So I have this button that when I click on it I want it to load two different text files into two different text boxes. This code works just fine for loading 1 file into one box,but not when I try to do the other thing. Whats wrong with it?

Code:
on (release) {
loadText = new loadVars();

[code].....

View 3 Replies

ActionScript 3.0 :: Passing Argument From A When Using One Class For Multiple Assets?

Aug 7, 2009

I had a class that I was passing a simple argument to like so:
 
var quiz_1_2:CaseStudyQuiz = new CaseStudyQuiz(2);
addChild(quiz_1_2);
 
I now would like to use this class for multiple MCs in my library. I thought I could let Flash create a class for each of them and specifying the CaseStudyQuiz class as the Base class. When I do that, I get the following error:
 
1136: Incorrect number of arguments.  Expected 0.

View 12 Replies

Flex :: ParentDomain Of Sibling ApplicationDomains Not Equal?

Dec 17, 2010

How can same be false in the following snippet?

var child1:ApplicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
var child2:ApplicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
var same:Boolean = (child1.parentDomain === child2.parentDomain);
trace(same);

View 1 Replies

ActionScript 3.0 :: Loading Assets From A SWC?

Apr 22, 2009

Wherever I look it says that loading external assets(.png, .jpg, gif) from a SWC is supported. However, I can't find a single example of doing this with anything else than Classes and Components.

I have 7 swf's that are loaded and unloaded by a main swf, a sort of menu system. These swf's all rely on loading in some .png's at runtime.

I made a new "Library Project" in Flex, filled the scr folder with my .png's, set the loading type to "external". Because I don't want the .png's compiled into my application .swf.

But how do I get a hold of my raw .png's from within my classes?

I can do:
var obj:AComponentFromSWC = new AComponentFromSWC() no problem.

But I want to do:
var pic:Bitmap = BitmapFromSWC();

Is this possible or did I completely misunderstand the use of SWC's?

This way I could let all the apps use the same SWC and it is easy to distribute all the graphics as one package and the loaded swf could share common graphics.

View 5 Replies

Loading Assets From Different Libraries

Sep 8, 2009

I currently have a "container SWF player" that loads SWFs externally and plays them.The sound file for the SWF is in the library of the container SWF player, because the player is using the duration of the sound file to determine how long the scrubber bar goes.The problem is, it sort of defeats the purpose of having a container SWF player if I have to create a different container SWF player file for each external SWF because there's a different sound for each external SWF.Is there a way to pull the sound file from the library of the externally loaded SWF into the container SWF player?So that depending on what external SWF is playing, it will pull the associated MP3 file from that SWF's library?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved