A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [RESOLVED] Help!

  1. #1
    absolutezero3424
    Join Date
    Nov 2006
    Posts
    508

    resolved [RESOLVED] Help!

    if I have multiple SWF's that load into another SWF, which we will call "loader.swf", is it necessary to import the libraries that I need within each of the LOADED SWF's, or can I just import the libraries that I need within the "loader.swf" and omit them from all the rest?

    I know that assets get loaded based on the path of the "loader.swf", so do libraries work similarly? For example, if I have:

    Code:
    //loader.swf
    import flash.events.Event;
    
    // some code to load my other SWF's
    AND

    Code:
    //SWF that gets loaded into "loader.swf"
    //notice I import no libraries
    
    some_mc.addEventListener(Event.COMPLETE, someHandler);
    is that sufficient, or do I need to include the libraries in each separate SWF?
    thx!

  2. #2
    Senior Member
    Join Date
    Sep 2005
    Location
    Detroit
    Posts
    193
    Each Swf is going to be running as if it had its own VM; therefore, it most likely will need to reload the libraries so you need to import them.

    Also flash will holler at you when you are testing the loaded SWFs. Yes it will add a touch of weight to the SWFs but it is always good to code and not get any errors in any of the parts of the code. If you practice good coding your project will always be easier to maintain and work the way you want it to. Way would your want to shortcut that?
    While the music played you worked by candlelight
    Those san francisco nights
    You were the best in town
    Just by chance you crossed the diamond with the pearl
    You turned it on the world
    That’s when you turned the world around

  3. #3
    absolutezero3424
    Join Date
    Nov 2006
    Posts
    508
    thx!

  4. #4
    Senior Member
    Join Date
    Sep 2005
    Location
    Detroit
    Posts
    193
    No Problem. Could you mark as resolved then?
    While the music played you worked by candlelight
    Those san francisco nights
    You were the best in town
    Just by chance you crossed the diamond with the pearl
    You turned it on the world
    That’s when you turned the world around

  5. #5
    absolutezero3424
    Join Date
    Nov 2006
    Posts
    508
    No problem. could you answer my other thread "MORE HELP!"? =)

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