Passing variable to a loaded movie

Let's say, a movie
loads an external MovieClip,
using a MovieClipLoader, and locks
the root, with code as the
following:
//I'd like to pass this variable
var myVar = "Passed it to Shell";
this.createEmptyMovieClip("Shell",
this.getNextHighestDepth());
var lo:Object = new Object();
lo.onLoadInit = function(target_mc){
target_mc._lockroot = true;
var mcl:MovieClipLoader = new MovieClipLoader();
mcl.addListener(lo);
mcl.loadClip("ExternalMovie.swf", Shell);
//end.
Now, once Shell is loaded, how
do I access myVar?
I tried _parent.myVar, which
doesn't work. (Since Shell has
the _root locked.)
I changed the onLoadInit to
lo.onLoadInit = function(target_mc){
target_mc.myVar = myVar;
target_mc._lockroot = true;
and then tried to access inside
Shell by this.myVar, which still
doesn't work.
I'd appreciate any suggestions.

myVar is defined in the
loading movie. (On the
first line lf the listed
code). Actually, it
is passed to the movie,
which in turn loads
external contents to a
MovieClip named Shell.
So how could myVar be
accessed inside Shell?

Similar Messages

  • AS3 pass variables-values from loaded external swf to parent swf

    Hi,
    I am working on an eLearning project that uses a main SWF (SWF1) and a second SWF (SWF2) with 2 quizzes in it. Published to AIR for Desktop and Android, SWF1 and SWF2 are packaged together in the AIR desktop or AIR APK exports.
    I can use a loader in SWF1 to call and run SWF2. What I am having difficulty with, need some help, is how to get the 2 scores from the 2 quizzes in SWF2 and load these values (each is a Number) back into SWF1. Once back in SWF1, they will be written to String and then displayed in a text box using textbox.text.
    While I've searched online and found examples for sending variables from parent to child SWF's, so far not able to find an understandable/useable AS3 script example for getting variables from child to parent SWF.
    Any help appreciated.
    Best Wishes,

    Hi,
    Still stuck. Can't get SWF2 to go back to SWF1 frame 2.
    SWF1, based on Kiran's AS file with the class AppEvent (class is not called in SWF1 until frame 2, and is called in SWF2 frame 9) loads SWF2 using:
    //SWF1, frame 2
    stop();
    import flash.display.Loader;
    expB100.addEventListener(MouseEvent.CLICK, L1, false, 0, true);
    function L1(e:MouseEvent):void {
    loaderL1.load(new URLRequest("Hotspot13.swf"));
    loaderL1.contentLoaderInfo.addEventListener(Event.COMPLETE, onChildLoaded);
    addChild(loaderL1);
    expB100.visible = false;
    function onChildLoaded(evt:Event)
        var child:DisplayObject = evt.target.content as DisplayObject;
        child.addEventListener(AppEvent.CHILD_DATA, getChildData);
        addChild(child);
    function getChildData(evt:AppEvent):void
        trace(evt.data.var1,evt.data.var2);
        tTest.text = String(evt.data.var1);
        tTest2.text = String(evt.data.var2);
    I wonder if there is some confusion between MovieClip and DisplayObject when SWF2 tries to return to SWF1 frame 2, using MovieClip(parent.parent).gotoAndStop(2); and gets an error?:
    Error #1034: Type Coercion failed: cannot convert flash.display::Stage@2f1ef71 to flash.display.MovieClip.
        at Hotspot13_fla::MainTimeline/onClick()[Hotspot13_fla.MainTimeline::frame9:124]
    Hotspot13 is SWF2; SWF2 frame 9 uses the following to try to return to SWF1 frame 2, causing the above error:
    function onClick(event:MouseEvent):void
        trace(this,this.parent,this.parent.parent);
        dispatchEvent(new AppEvent(AppEvent.CHILD_DATA,{var1:score1,var2:rbselectedT},true)); 
        MovieClip(parent.parent).gotoAndStop(2);   
    Or maybe the AppEvent.as file is imported in frame 1 when it should be imported in another later frame like SWF1 frame 2 where it is first used?
    Best Wishes,

  • Passing variables to loaded external movie

    Ok, this problem has beaten me for the last 2 days. It seems
    to be extremely simple, I am on main movie and I am using
    MovieClipLoader class to load external movie callMe.swf into movie
    holder called holder_MC, then from main using onLoadInit or
    onLoadProgress listeners I can target dynamic text inside
    callMe.swf as holder_MC.myTXT.text = "blablabla" or I can change
    frames in callMe.swf by holder_MC.gotoAndStop(5). But HOW TO PASS
    VARIABLE myVar to callMe.swf so it executes something there? Using
    holder_MC.myVar DOESN'T WORK!!!!!!!!!!!!!!
    Thanks for any help,
    Zbynek

    UPDATE... I copied the link to another page with my variables in the image attributes as I posted above. And it works using the values that are cached for those items. Is there any way to do this on the same page as my original link without my users having to change to a different page?

  • Loading movie in new level from variable

    What I'm trying to do is load a movie in another level wich
    is defined by a variable (i)
    On level 0 there is this piece of code
    i = 10;
    loadMovie("Home.swf", 10); (I've entered 10 instead of i
    because otherwise I wouldn't get anything at all)
    Now every time I go to another 'chapter' it has to load a
    movie into the next level
    From Home.swf I click the button to the next chapter wich
    contains:
    on (release) {
    unloadMovie(_level0.i)
    i++
    loadMovie("chapter01.swf", _level0.i);
    This obviously doesn't work otherwise I wouldn't be posting
    here :p This whole thing does absolutely nothing :s
    Anyone any idea?
    Thanks in advance

    ur code works for me only if i use loadMovieNum instead of
    loadMovie......if u r using levels to load movie then use
    loadMovieNum and unloadMovieNum.....u use loadMovie when u ve to
    load a movie on a movieClip and loadMovieNum when u want to load on
    some level..try this m sure it ll help u

  • Using load movie and load variable

    Ok i am having a problem with my movie... when i test it
    using test movie it is fine but when i preview in HTML or run the
    SWF on it own i am having a problem... and i spotted the items i am
    having a problem with but problem is i dont know why.
    i am loading a movie dynamically in my main movie using load
    movie
    loadMovie("menu.swf",_root.i_dress2.i_content);
    and in the actual movie menu.SWF i am loading a text
    dynamically using loadvariable... but i am actually loading it into
    the movie that has already been loaded into my main movie... maybe
    it i will make sense when you see my line of script that is in the
    menu.sef movie....
    loadVariables("menu.txt",_root.i_dress2.i_content.arg.maskedText.scrollpage);
    so i guess it is like i am loadingthe txt into the text file
    after it is loaded into the main movei so that is why it is
    referring ot the text field that way...
    anyway it works fine when i go thorugh test movie but when i
    preview in HTML the text doenst come out...
    am i doing this thewrong way.? is there something i am
    missing?
    Thanks...any help will be appreciated!!

    You may be hitting a Flash 8 security issue that you cannot
    load external
    data using file:////path_to_your_movie/youmoviehtml in a web
    browser. You
    may need to use
    http://thedomain.com/yourmovie.html.
    Lon Hosford
    www.lonhosford.com
    May many happy bits flow your way!
    "batgirl_Sa" <[email protected]> wrote in
    message
    news:e2v04c$lq$[email protected]..
    Ok i am having a problem with my movie... when i test it
    using test movie
    it
    is fine but when i preview in HTML or run the SWF on it own i
    am having a
    problem... and i spotted the items i am having a problem with
    but problem is
    i
    dont know why.
    i am loading a movie dynamically in my main movie using load
    movie
    loadMovie("menu.swf",_root.i_dress2.i_content);
    and in the actual movie menu.SWF i am loading a text
    dynamically using
    loadvariable... but i am actually loading it into the movie
    that has already
    been loaded into my main movie... maybe it i will make sense
    when you see my
    line of script that is in the menu.sef movie....
    loadVariables("menu.txt",_root.i_dress2.i_content.arg.maskedText.scrollpage);
    so i guess it is like i am loadingthe txt into the text file after
    it isloaded into the main movei so that is why it is referring ot
    the text fieldthat way... anyway it works fine when i go thorugh
    test movie but when i preview inHTMLthe text doenst come out... am
    i doing this thewrong way.? is there something i am missing?
    Thanks...any help will be appreciated!!

  • Can I pass variables in the URL string?

    I am trying to get some variables into a loaded swf at
    runtime. The variables will carry information so the swf can load
    the correct xml file. I thought we could pass them through the URL
    string like so:
    new URLRequest("testing.swf?myVar=varOne
    but it just throws an URL cannot be found error. How can I
    get variables into my swf at runtime?

    What you are doing is fine. But you will always get that
    error when testing
    the movie (Ctrl+Enter). Try it in a browser and it should
    work.
    BTW, another way of doing the same is to use a URLVariables
    object, like so:
    var req:URLRequest = new URLRequest("testing.swf");
    var vars:URLVariables = new
    URLVariables("myVar=varOne&myVar2=varTwo");
    req.data = vars;

  • Passing a parameter between flash movies

    I have a flash movie for drop down menus that is called by all flash/movie banner sections of my site. The banner movies use FlashVars to set the heading and an image. The trouble is that the flash menus also were set to use a flashvar to dictate the context of the menus and leave one top level menu highlighted to show the content to the user.
    I have not been able to get both of them to use the Flashvars functionality. The html page calls the banner movie directly and it can therefore access the Flashvars. The menu swf however - which is not called from the html page but instead is called from within the banner movie - cannot access the flashvars variables. That leaves me with two choices:
    1. Either use a different method for passing the context variable to the menu movie.
    2. HTML code calls the banner movie. I can continue using flashvars and get the context variable by reading it from within the banner movie - and then somehow pass the value down to the menu movie if that is possible.
    Far greater AS coders than me frequent this site and I'm hoping one of you can suggest how to get this done...
    Thanks yet again,
    Sam

    right, in the banner swf you've got something like:
    // use this to set a default value just in case
    var contextValue= 0;
    // now set it to the flashVar
    contextValue= root.loaderInfo.parameters.contextFlashvar;
    then pass the var you create into the menuswf -- see the red bit below:
    // create loader and ask it to load something
    var myLoader:Loader = new Loader();
    myLoader.load(new URLRequest("swfFolder/mySwf.swf"));
    //add listeners to the loader
    myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, handleComplete);
    myLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, handleProgress);
    myLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, handleError);
    function handleComplete(event:Event){
         // give the loaded swf a reference -- name of the loaded file means nothing to flash file
         var westview_menus = myLoader.content as MovieClip;
       // now use that reference to set vars
         westview_menus.context = contextValue;
         addChild(westview_menus);
    function handleProgress(event:ProgressEvent):void{
        //progress handler stuff
    function handleError(event:IOErrorEvent):void{
        // error handler

  • Can Captivate pass variables to Flash?

    I have a Captivate 4 quiz embedded in a .FLA (AS2).  Can this quiz pass user-defined and/or system variables to the .FLA?  If so, can someone give me an example code of how this would work?  Let's say I have a user-defined variable in Captivate, varTest with initial value of 0.  On the last slide of the quiz I assign varTest a value of 1.  How do I pass this variable to Flash and how will Flash listen for this value change?  I'm looking for something similar to the following code, but I can't seem to get all of it:
    //code that loads movie here; I have this piece working fine.
    //code that listens for varTest1 value in Captivate
    myListener = function():Void
         var myFlashVar = this.mc_Container.varTest //I load my captivate SWF into mc_Container
         if(myFlashVar == 1)
              trace("myFlash Var = 1")
    some listener code here...
    Thanks.

    samprakash,
    You are going into difficult territory.
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=464&threadid=1325387
    There is no solution other than a custom solution, likely
    involving many days and hours of work. If you must do this, you can
    begin by analyzing the swf files for variables while in-use (loop
    through the Captivate swf mc object).

  • Passing variables / accessing other swfs

    It has been years since I used flash, so I consider myself a
    rank armature. I'm Using Flash 8 and would like the code to be
    backward-compatible to ver. 6.
    I have a big movie, with lots of images. I've comprimised the
    image quality as much as I dare, but it still takes 20-30 seconds
    to load (my client is in Paris, and claims to have the fastest
    connection in Paris, but it takes more than a minute to load it
    from there, even when loaded on his local server). I'm assuming
    that the only way to achieve a meaningful decrease in load time
    will be to split it up into smaller swf's, one mail swf, and each
    sub-page in it's own swf, and have each swf loaded only when
    needed. The fla can be downloaded here:
    cjreynolds.com/fuda30.zip
    The movie currently runs an intro animation, then when a link
    is clicked, it loads different "pages" which consist of large movie
    clips. These are contained in a MC called "pages", and are called
    by manipulating a root variable called "level" - ie: "level = 1"
    causes the MC at frame 1 of the "pages" MC to be displayed. (this
    was an existing movie that I have been tasked with modifying).
    #1 - Is it correct that splitting the individual pages into
    different swfs the only way to lessen load time? I would welcome
    any other suggestions.
    #2 - If spitting the movie up is the way to go, I'm thinking
    I need to replace the movie clips in the "pages" MC with swfs. How
    do I tell each individual page to go back to the main (intro) swf
    and load a different page? The main timeline contains animations
    that "overlay" the sub-pages, creating a transision effect when
    going from one page to the next.
    Thanks for your help - you guys (and gals) have been a great
    source of aid for me!
    joe

    Yes, _root is the wrong thing to use, and _global is never
    good practice. I
    don't use loadMovieNum - I'd use MovieClipLoader and it's
    loadClip method to
    load other swf's into target clips. You can then use
    something like
    this._parent to get to the timeline of the clip 'containing'
    the loaded
    clip.
    However, I think your best bet is to probably use a singleton
    class. That
    way you have your main movie instantiate and set variables
    within the
    singleton - then any other movies can easily create an
    instance (which will
    be the same instance since it's a singleton) and get the
    values you need.
    Simple example:
    class VariableHolder{
    private static var instance:VariableHolder;
    private var myA:Number;
    private function VariableHolder(){}
    public static function getInstance():VariableHolder{
    if(instance == undefined){
    instance = new VariableHolder();
    return instance;
    public function setVariableA(newA:Number){
    myA = newA;
    public function getVariableA():Number{
    return myA;
    So, in your main movie you'd do:
    var myVariables = VariableHolder.getInstance();
    myVariables.setVariableA(50);
    And then in another movie you do:
    var myVariables = VariableHolder.getInstance();
    var myA = myVariables.getVariableA();
    //will set myA = 50;
    Because you're using a singleton - the second getInstance()
    call returns
    just the one class instance - held in the class' instance
    variable. You can
    have any/all movies instance the class, and only one instance
    is ever
    returned... Once you wrap your head around this it's a very
    efficient way to
    pass stuff around between various movies.
    Dave -
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • Passing variables from AS3 to PHP

    Hi there
    I am having some trouble in passing variables from AS3 to PHP. I am using flash and php both in the same file [try.php].
    I've stuck with this for two days.. Here's what I have done. Please help!!!
    header.fla [Actionscript in the timeline]
    stop();
    import flash.events.Event;
    import flash.display.Sprite;
    import flash.net.*;
    var url:String = "http://localhost/0000/try.php";
    var req:URLRequest = new URLRequest(url);
    var loader:URLLoader = new URLLoader();
    var variables:URLVariables = new URLVariables();
    send_btn.addEventListener(MouseEvent.CLICK, sendForm);
    function sendForm(evt:MouseEvent):void
        // add the variables to our URLVariables
        variables.asd = "value";
        // send data via post
        req.method = URLRequestMethod.POST;
        req.data = variables;
        loader.dataFormat = URLLoaderDataFormat.TEXT;
        // add listener
        loader.addEventListener(Event.COMPLETE, onLoaded);
        loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
        //send data
        loader.load(req);
    function onLoaded(evt:Event):void
        var result_data:String = String(loader.data);
        if (result_data)
            trace(result_data);
        else if (!result_data)
            trace("error");
    function ioErrorHandler(event:IOErrorEvent):void
        trace("ioErrorHandler: " + event);
    try.php
    <body>
    <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="563" height="280">
      <param name="movie" value="header.swf" />
      <param name="quality" value="high" />
      <param name="wmode" value="opaque" />
      <param name="swfversion" value="6.0.65.0" />
      <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
      <param name="expressinstall" value="../Scripts/expressInstall.swf" />
      <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
      <!--[if !IE]>-->
      <object type="application/x-shockwave-flash" data="header.swf" width="563" height="280">
        <!--<![endif]-->
        <param name="quality" value="high" />
        <param name="wmode" value="opaque" />
        <param name="swfversion" value="6.0.65.0" />
        <param name="expressinstall" value="../Scripts/expressInstall.swf" />
        <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
        <div>
          <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
          <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
        </div>
        <!--[if !IE]>-->
      </object>
      <!--<![endif]-->
    </object>
    <?php
    if($_POST['asd'])
    echo "value of var1 is <b>".$_POST['asd']."</b>";
    else
    echo "bad luck";
    ?>
    </body>
    BIG THANKS!!

    the problem is nothing your showed.   did you see a security warning that you ignored?
    to test, if that's the problem go here and adjust your security settings:  http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04a.ht ml
    if that fails, upload your files to a server and confirm everything works.  then start working on your local configuration.

  • Unable to load movie playlist?

    I'm really starting to regret Upgrading to Director 11. I
    didn't have any of these issues going from MX to MX 2004. All I'm
    trying to do is make a simple projector work on a Mac and it's one
    issue after another. Not to mention all this after updating a whole
    boat load of Xtras 11 requires.
    The new one is this;
    Unable to load movie playlist. Does the INI file exsist? It
    must contain a section '(Movies)' with an entry
    'Movies01=pathname.dir'.
    I've already read a couple of other forum post with the same
    error message going on with others but can't find certain files
    required to make the fix like the 'Projec32.skl',
    and I don't know how to read, let alone make an .INI file.
    I'll mention I got this error after updating to Shockwave 11
    EVEN though I was not publishing a Shockwave movie.
    I know I just need to include a certain file on my CD when I
    burn one because all works great on the desk top, but I'm throwing
    darts trying to figure out what the CD burn is missing.
    So to make a long story short does anyone know what I might
    be missing?
    I'm new to making director movies for the Mac, and even using
    a Mac so I might need it spelled out a little more for being a
    novice.
    Thanks in advance. :o)>
    PS I tried making a Mac Projector from my PC with no good
    results either.

    This is a very frustrating problem.  I have run into it as well, but can't tell you exactly how I solved it, its been a while since I've seen it.  It does have something to do with the length of the path to your projector when its published.  I would suggest moving your movie as close as possible to the root of the drive, you may even want to restart to ensure all the internal variables have been reset and then republish the movie.
    If you publish the movie from your authoring location and then copy the projector to a cd or the desktop the path length seems to be built into the projector at publishing. So that does not solve the problem.  It is fairly easy to get a long path name - c:/mylocaldrive/documents and settings/yourusername/yourprojectsfolder/yourprojectname.dir has a path name length of 100 characters!  I realize you are on a mac, but the same rules apply.
    I also might be mistaken with the maximum path length.  Perhaps its 128 characters?
    Has anyone else run into this error?
    Mike M

  • How can I pass variables from one project to another using Javascript?

    Hi all, I am trying to do this: let learners take one course and finish a quiz. Then based on their quiz scores, they will be sent to other differenct courses.
    However, I wish keep track on their previous quiz scores as well as many other variables.
    I found this nice widge of upload/download variables by CPguru (http://www.cpguru.com/2011/05/18/save-and-load-data-widget-for-adobe-captivate-4-and-adobe -captivate-5/). However, this widget works by storing variables from one project in local computer and then upload it to another project.
    My targeted learners may not always use the same computer though, so using this widget seems not work.
    All these courses resided in a local-made LMS which I don't have access to their code. Therefore, passing variables to PHP html files seems not work.
    Based on my limited programing knowledge, I assume that using Javascript to pass variables may be the only possible way.
    Can someone instruct me how to do this?
    Thank you very much.

    If you create two MIDlet in a midlet suite, it will display as you mentioned means you can't change the display style.

  • How can I access global variables in a loaded Applescript?

    How can I access global variables in a loaded script, in Xcode, ApplescriptObjC? Basically, I have a global variable defined in my parent script using "property", and I need to modify objects connected to those variables inside of a loaded script.
    Example:
    Parent script:
    script AppDelegate
    property myTextField : missing value
    //linked to a text field object
    tell myScript to myAwesomeHandler_()
    end script
    Loaded script:
    on myAwesomeHandler_()
    myTextField's setStringValue_("The new Xcode is so glitchy ugh")
    //changes value of linked text field of parent script
    end myAwesomeHandler_
    The problem is, the variable is undefined in the Loaded script, and I need it to have the same value as the parent script, and I don't want to pass the variable through the Handler. Any ideas?

    I think want you are looking to do will need to be done in two steps. Because myTextField needs to be a property for the ObjectiveC part of the code you cannot turn it into a global.
    However if you make a temporary variable global assign the string to it in the handler then set myTextField off of it.
    global myTextFieldGlobal
    script AppDelegate 
    property myTextField : missing value 
    //linked to a text field object 
    tell myScript to myAwesomeHandler_() 
    myTextField's setStringValue_(myTextFieldGlobal)
    end script 
    on myAwesomeHandler_() 
    set myTextFieldGlobal to "The new Xcode is so glitchy ugh"
    //changes value of linked text field of parent script 
    end myAwesomeHandler_ 
    I know you stated you did not want the handler to return a value but I have to ask why? Global's, imo, are not a good idea and really should be used as a last resort.
    One other possibility is to pass a reference to the property to the handler. Not sure if that works in AS of if that would satisfy our requirement of not passing the variable through the handler
    <edit>
    Another though have you tried to define the property outside the script?  That is
    property myTextField : missing value
    script AppDelegate
    Not sure if that will work.
    You might also want to have a look at Scope of Properties and Variables Declared in a Script Object

  • OBIEE 11g How to pass variable from one prompt to another prompt in dashboard page.

      How to pass variable from one prompt to another prompt in dashboard page.
    I have two prompt in dashboard page as below.
    Reporttype
    prompt: values(Accounting, Operational) Note: values stored as
    presentation variable and they are not coming from table.
    Date prompt values (Account_date, Operation_date)
    Note:values are coming from dim_date table.  
    Now the task is When user select First
    Prompt value  “Accounting” Then in the
    second prompt should display only Accounting_dates , if user select “operational”
    and it should display only operation_dates in second prompt.
    In order to solve this issue I made the
    first prompt “Reporttype” values(Accounting, Operational) as presentation
    values (custom specific values) and default presentation value is accounting.
    In second prompt Date are coming from
    dim_date table and I selected Sql results as shown below.
    SELECT case when '@{Reporttype}'='Accounting'
    then "Dates (Receipts)"."Acct Year"
    else "Dates (Receipts)"."Ops
    Year"  End  FROM "Receipts"
    Issue: Presentation variable value is not
    changing in sql when user select “operation” and second prompt always shows
    acct year in second prompt.
    For testing pupose I kept this presentation
    variable in text object of dashboard and values are changing there, but not in
    second prompt sql.
    Please suggest the solution.

    You will want to use the MoveClipLoader class (using its loadClip() and addListener() methods) rather than loadMovie so that you can wait for the file to load before you try to access anything in it.  You can create an empty movieclip to load the swf into, and in that way the loaded file can be targeted using the empty movieclip instance name.

  • How to pass variables between loaders

    Hi,
    I am trying to load an image, with descriptive text and a back button on the click of a thumbnail of the image. I am using a MovieClipLoader instance to do this.
    Here are my problems:
    1. I tried loading the image, with the text(which is within an external swf), using the same loader, but since I am placing them dynamically, depending on the dimensions of the image, I need to pass variables between the two. The image loader is taking longer than the text (obviously) but I need the dimensions of the image before I can place the text. How do I do that??
    2. I tried using two loaders, with separate listeners, and the problem once again is that the text loads before the image, and is hence placed with default values instead of the values derived from the image. The code is within onLoadInit(). Is it possible for me to get the dimensions of the image from onLoadStart()???
    3. There is a back button within the text.swf. I want the image and the text.swf to be unloaded when this button is clicked. How can I achieve that? Can I call loader.unloadClip(target), from within this? Will it recognize the variable?
    4. Is there a much easier way to do this, which I am sadly unaware of?
    Any help will be appreciated.

    Tried the onloadstart() function, but it gives target._width and _height as 0. So that is ruled out...any other suggestions?

Maybe you are looking for