A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: loadmovie problem

  1. #1
    Junior Member
    Join Date
    Feb 2002
    Posts
    12
    Hello all.

    I am building a site that uses loadmovie to load other movies into a content area on the stage.

    I have a "main" movie which contains some information on the top and bottom of the stage. On the first frame of this single frame movie I loadMovieNum ("navigation.swf", 1), into level 1 and loadMovieNum ("home.swf", 2)into level 2.

    The "navigation.swf" movie is a 1 frame movie with a movie clip containing all of my buttons. The first frame of the mc is the main menu state, then elesewhere in the timeline is the options for the chosen item. On the first frame I have a mouse release action on each button that jumps the playhead to the appropriate label on the timeline.
    At this point the options for the chosen item appear on screen. On these I have a release action that unloads whatever movie you were looking at in the content area(unloadMovieNum (2), then I load a new movie into level 2 and have the movie go to the appropriate label (_level2.gotoAndStop("chosenoption").

    All of this works as expected but the problem is that if you go back to somewhere you have already been, the movie does not reload. Instead of the movie showing up in level 2 there is nothing.

    I would appreciate any help with this. Thanks.

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    you know you don't need to unload whatever is on _level2 before you load something else on the same _level2, right? the new swf will replace automatically what was on that same _level before.. Don't know if that causes your prob. but it worth a try. Something else: you know too that you can't load a movie and target a frame in it right away (meaning in the same button press for instance)
    gparis

  3. #3
    Junior Member
    Join Date
    Feb 2002
    Posts
    12
    Thanks for the help gparis. I think your suggestion has helped. The only problem is that now when I go to a target frame the timeline goes to it and then back to the begining as if there was no stop action on the target frame.

    (Quote:you know too that you can't load a movie and target a frame in it right away (meaning in the same button press for instance))
    I tried fixing this by putting the loadmovie action at the begining of the navigation movie. The second line of code targets a frame in the navigation movie.

    on (release) {
    loadMovieNum ("home.swf", 2);
    gotoAndStop ("optionmenu");
    }

    At the frame label "optionmenu" in the navigation movie I am trying to target a frame in the movie "home.swf"

    _level2.gotoAndStop("glacial geology");

    Thanks
    surveysays

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    on (release)
    {loadMovieNum ("home.swf", 2);
    gotoAndStop ("optionmenu");
    }

    You forgot to say "what" goes to And Stop..
    If this action is on _level1 (nav is on _level1, right?) say _level1.gotoAndStop ("optionmenu");
    always tell Flash "what" is going "where"
    gparis

  5. #5
    Junior Member
    Join Date
    Feb 2002
    Posts
    12
    (Quote: You forgot to say "what" goes to And Stop..
    If this action is on _level1 (nav is on _level1, right?) say _level1.gotoAndStop ("optionmenu");
    always tell Flash "what" is going "where")

    "Optionmenu" is located on level1 with navigation. I tried your suggestion and now it seems that flash does not go to the target frame in level2 at all.

    I have in home.swf the following labels
    "optiona"
    "optionb"
    "optionc"
    "optiond"
    "optione"
    "otione" seems to work but it is in another movie than a-d.
    Do you think I should just make new movies for a-d.

    Thanks
    surveysays

  6. #6
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    something else i noticed ("glacial geology"); you can use spaces in the labels. try "ggeology or what you want but no spaces.
    gparis

  7. #7
    Junior Member
    Join Date
    Feb 2002
    Posts
    12

    loadmovie problem

    Thanks for the help gparis. I ended up having to rearrange some things but everything is working perfectly now.

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