A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: _root.play(); works but goto frame doesnt

  1. #1
    Junior Member
    Join Date
    Jan 2004
    Location
    Florida
    Posts
    20

    _root.play(); works but goto frame doesnt

    In a game _root.death tells me if the player is dead or not.. on the movieclip that generates enemies it has an if statement that says if death==1 then goto frame 2...

    For some reason i cannot have a movie clip on the main timeline tell the _root to go to a specific frame, i can only tell it to play();

    I have the statement on a onenterframe event....i also tried makeing a function and calling it, nothing happens again, i also tried putting the call to the function on the movieclip's timeline, still same result but if i change the function to play(); it works fine...

    is there an easier way to make the _root. go to a specific frame depending on the value of a variable ?
    -Jshpro2

    visit my website at www.onlycheaters.com

  2. #2
    Senior Member jbum's Avatar
    Join Date
    Feb 2004
    Location
    Los Angeles
    Posts
    2,920
    _root.gotoAndStop(2);

    will goto (and stop on) frame 2.

    _root.gotoAndStop(x);

    will goto (and stop on) whichever frame corresponds to x (if x is 2, then frame 2).

    If you are stilling having problems,
    would you show us the actual script you are using (that isn't working) ?

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