Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 08-30-2003, 03:49 PM   #1
Registered User
Join Date: Aug 2003
Posts: 93
Default play 15 frames and change scene

i need a button to do exact that. when u click the button it must play 15 frames and then go to other scene.

i can`t tell to go to other scene in the last frame because there are a lot of scenes and buttons that have to do the same.

5 buttons - 5 scenes - play 15 frames and then change the button-scene

send help!!!!!
darthnacho is offline   Reply With Quote
Old 08-30-2003, 05:44 PM   #2
Adrenaline's Avatar
Join Date: Jul 2003
Location: Texas
Posts: 322

it's recommended the you use frame label instead of scenes. So, this code is to go to a frame number or a frame label, but it can't be used to goto scenes.
place this code at the beginning of the timeline.:
ActionScript Code:
_root.onEnterFrame = function () { button1.onRelease = function() { Frame = "YourFrameLabel" } button2.onRelease = function() { Frame = FrameNumber } //etc. }
place this code at the end of the timeline:
ActionScript Code:

but if you have to use scene do this:
place this code on the timeline:
ActionScript Code:
button1.onRelease = function() {     Frame = _root._currentframe+16;     gotoAndPlay(YOURNEXTFRAME);     _root.onEnterFrame = function() {         if (frame == _root._currentframe) {             gotoAndPlay("SCENE2", 1);         }     }; }; button2.onRelease = function() {     Frame = _root._currentframe+16;     gotoAndPlay(YOURNEXTFRAME);     _root.onEnterFrame = function() {         if (frame == _root._currentframe) {             gotoAndPlay("SCENE3", 1);         }     }; }; //continue for each button
in the above code i am guessing that you have a stop action before the 15 frames you want to play

Hope that helps
Adrenaline is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 06:32 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.