dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Problem with external preloader

  1. #1
    Member
    Join Date
    Sep 2002
    Posts
    50

    Problem with external preloader

    I have a main preloader it works fine.

    But the problem is when i want to load my external galleri.swf file into my main.swf then the preloader in galleri.swf wont work.

    I have loaded the galleri.swf with my following hand made code.. the preloader in galleri.swf works as long I only test it from gallery.swf and not testing it from my main.swf file.

    on(release) {
    this.createEmptyMovieClip("holder_mc",1);
    holder_mc.loadMovie("galleri.swf");
    holder_mc._x = 0;
    holder_mc._y = -406;

    //Movieclip GotoAndPlay Behavior
    _parent.kort.gotoAndStop("start2");
    //End Behavior
    }

    Really need a hand here.. have now tried for hours and with different preloaders.

  2. #2
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    Add this line after this.createEmptyMovieClip("holder_mc",1);

    holder_mc._lockroot = true;
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  3. #3
    Member
    Join Date
    Sep 2002
    Posts
    50
    WOW your the man... what does the line really do ?

  4. #4
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    The problem you have is a scope problem. When you load the childmovie, the main timeline for your childmovie is the _root from your parentmovie. You can prevent that by setting _lockroot of the movieclip into which you load the movie to true.
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  5. #5
    Member
    Join Date
    Sep 2002
    Posts
    50
    Ahh okay.. copy that.. it makes sense.

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