A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Help with _levels please!!!

  1. #1
    Member
    Join Date
    Jan 2003
    Location
    Houston
    Posts
    73

    Help with _levels please!!!

    If I need to tell a level1 where to go and play, what would the script look like? This is what i cam up with but it doesnt seem to work, the level1 clip is called servicebanner.swf and it does have two scenes with a preloader. Thanks.

    _root.level1.gotoAndPlay(93);

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Just...
    _level1.gotoAndPlay(93);
    No _root!

    Hope you're not trying this on the same frame's or button's actionscript as the loadMovieNum action, 'cause that ain't going to work!

  3. #3
    Member
    Join Date
    Jan 2003
    Location
    Houston
    Posts
    73
    I dont have it on the same frame, but on the same timeline. I need it to play on scene two, as is, it looks as if they timeline will start on scene 1, am i correct?

    _level1.gotoAndPlay(93);
    Last edited by dna_hard; 06-25-2004 at 12:29 PM.

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Frame 93 of a Scene 2 in the movie loaded on level 1?

    Are you saying that with my proposed script you're ending up on frame 93 but in the first scene of that loaded movie?

  5. #5
    Member
    Join Date
    Jan 2003
    Location
    Houston
    Posts
    73
    I am basically trying have level0 and level1 control each others timeline at certain points.

    For instance, when level0 gets to a certain frame, it stops and tells level1 to start playing, when level1 gets to a point and stops, it tells the level0 to start playing and vice versa. but I have scenes and am not sure how to have have the levels go to certain scenes and play.

  6. #6
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Since you cannot target Scene names (other than when everything is on the main timeline), best is to allways target labeled frames, not even frame numbers, which are more error prone!

    Thus, to target a frame in a any particular scene in a movie loaded on level 2, for example, _level0 being the equivalent of _root when talking to other movies loaded on other levels, label that frame with an unique label such as my_start2 (no number only labels, or at least not starting off with a number, no caps and no special characters other than the underscore...), add the targeted level to your path, and target that labeled frame...

    _level2.gotoAndPlay("my_start2");

    The reverse, from level 2 to level 0 (_root), would be...

    _level0.play();
    Or...
    _level0.gotoAndPlay("my_start1");
    Or...
    Whatever action you want the main timeline to do.

  7. #7
    Member
    Join Date
    Jan 2003
    Location
    Houston
    Posts
    73
    That makes things alot easier, thanks for the 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