A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: question about swf file download and levels

  1. #1
    Senior Member
    Join Date
    Jul 2010
    Posts
    111

    question about swf file download and levels

    Hi guys, heres kind of a strange question,

    Say I load movies into different levels in this way:

    loadMovieNum("http://www.mysite.com/flashmovie.swf",1)
    loadMovieNum("http://www.mysite.com/flashmovie.swf",2)
    loadMovieNum("http://www.mysite.com/flashmovie.swf",3)
    etc etc thru 100

    See how the swf "flashmovie.swf" is the same movie being loaded into different levels. My question is this...

    Is it going to download "flashmovie.swf" a hundred times, or will it 'recycle' the first downloaded one and use that same one for the rest of the 99 times, like a sort of cache, so to speak.

    Thanks

    p.s please dont reply with "why dont you use duplicateMovieClip".. I know what I want to do
    Last edited by sammy123123; 09-20-2012 at 07:51 PM.

  2. #2
    Senior Member
    Join Date
    Jul 2010
    Posts
    111
    *edit* I need to load the same movie into different levels, thats why I cant use 'duplicateMovieClip'.. unless theres some sort of equivalent for duplicating an entire movie into a new _level. Thanks!

  3. #3
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    This will save you some typing,
    PHP Code:
    ClipAmount 100;

    for (var 
    0ClipAmounti++)
    {
        
    loadMovieNum("yourFile.swf"1);// i + 1 so not to over run level 0, base level.
        
    trace("Loaded Level: " + [1]);

    the swf will be cached and when the first is loaded the rest will be instantish.

  4. #4
    Senior Member
    Join Date
    Jul 2010
    Posts
    111
    Thanks a bunch, you have no idea how much that helps!

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