A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: _root problem

  1. #1
    Senior Member liquidfists uk's Avatar
    Join Date
    Mar 2003
    Location
    uk
    Posts
    318

    _root problem

    hi i have a problem here, ok there is a shadow of a guy that a apears on the scene through a movie instance inside this instance there is a button now i am trying to get the the button to make the main scene go to the next frame

    there are 2 scenes first scene is called preloader second scene is called menu

    the movie instanceses buttons overall adress is this
    scene---movie---button--
    menu.blackguys.kenbutton

    i am trying to make the menu scene continu to the next frame, it stops on frame 120 and with this button i want to play frame 121 then stop

    i have tried this actionscript but it dont want to work
    on (release) {
    stopAllSounds();
    _root.gotoAndPlay(121);
    }

    does anyone kknow the problem?
    Last edited by liquidfists uk; 01-24-2004 at 11:50 AM.

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    You can try...

    on (release) {
    stopAllSounds();
    _root.nextFrame();

    nextFrame(); is not a play action, it moves the playhead to the next frame and stops.

    Alternately, you could label the 121th frame with a unique label, such as my_frame121, or whatever suits you (no number only labels or at least not starting off with a number), and target that labeled frame...

    on (release) {
    stopAllSounds();
    _root.gotoAndStop("my_frame121");
    }

    If you insist in using a frame number, you have to realize that it's a cumulative frame number of all the frames on the timeline, including the preloader frames. Thus if you have 3 frames in your preloader and are targeting frame 121 or your main scene, you have to target 3 + 121 = 124...

    on (release) {
    stopAllSounds();
    _root.gotoAndStop(124);
    }

    The labeled frame method is the best though!

  3. #3
    Senior Member liquidfists uk's Avatar
    Join Date
    Mar 2003
    Location
    uk
    Posts
    318
    ok the first one helped and im sure the other 2 would work aslo i did try labeling the frame but it didnt work but i propable had an eror sumwhere, i really im trying to take in as much as i can with flash im getting there slowly. thanx maty

  4. #4
    Senior Member liquidfists uk's Avatar
    Join Date
    Mar 2003
    Location
    uk
    Posts
    318
    you can check the website to c it in action if you want

    www.liquidfists.com

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