A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: addChild and loadMovie help please

Hybrid View

  1. #1
    There is a very simple solution for this!

    create a variable that does not get destroyed(global kinda). If your using the CS3 interface just place it in the actionscript part of the stage. If your using the sdk to compile just make it a private var in your class.
    After setting it for the first time add it to the myemptyMC object.

    when you want to make that variable something else just reference it(set it) to another object.

    Example


    Code:
    var child:Object=mySwfLoader;
    myEmptyMC.addChild(child);
    
    //this changes it to a new thing because I'm setting child which is already added to the MovieClip to something new
    child=new Object();
    Hope this helped !

    If not just ask about what you don't understand.

  2. #2
    Matthew Wallace Web Developmen
    Join Date
    Jul 2007
    Location
    Spring Hill, TN
    Posts
    3

    That should work

    Thanks I will give that a try. That should work.

    thanks,
    Matthew

  3. #3
    Senior Member
    Join Date
    Jan 2006
    Location
    USA
    Posts
    383
    Let's say your Loader object is called loader.

    I'm pretty sure you could just do:
    PHP Code:
    loader.unload();
    loader.load(new URLRequest(yourfile)); 
    That'll unload its current loaded content freeing up the ability to load in the new file for your loader object.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center