Goto And Play Scene... Having Trouble
This should be very simple so I must be doing something stupid wrong, but heres what I have.
A movie with 3 diffent scenes. On each scene is a navigation menu on the left. When you click one of the buttons this is the code;
on (release) { gotoAndPlay("Tour"); also have tried it with gotoAndPlay("Tour", 1); }
Shouldn't this goto scene "Tour" and play it?
Instead it goes to the scene that follows the current scene and if its on the last scene it starts over by going to the first scene. What am I doing wrong? Thanks in advance...
FlashKit > Flash Help > Flash General Help
Posted on: 07-06-2005, 08:35 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
On Play Goto Scene?
hi. i tried searching for a thread with this but was unsuccessful . . could i get some help on this? i don't think it's a very hard one but i'm kinda new in actionscript. .
i've got a .swf with 3 scenes on an html page.
the first time the page loads the first scene plays and then stops.
if you mouse over that it will play scene 2 and stop. mouse over scene 2 it plays scene 3 and stops.
mouse over scene 3 and it plays scene 2. and continues the cycle between scene 2 and 3.
now on the html page there is a frame. there are links on the same page as the swf. every time a link is pressed it loads a page inside the frame, and at the same time it gives the command to play the .swf.
what i want to happen is for the .swf to see if it's in scene 1, 2, or 3.
if in scene 1 (when the play command is issued)play scene 3.
if in scene 2 (when the play command is issued)play scene 3.
if in scene 3 (when the play command is issued)play scene 2.
is there some way to set this up so that the swf can do this? also, where do i put this action scripting? would i need to put one on each scene? or just on scene 1?
thank you in advance for the help. .. 8*)
looooooooove,
botti
Goto And Play Scene
This is a really dumb question, and Im sorry for that, but when ever I try to make a button designated to take the user straigt to a scene, I use ''on (release) {gotoAndPlay(1,1);}'', and Its says that it must be a quoted string. What does this mean? and what is the proper syntax?
Goto And Play Scene?
For some reason i'm having problems swapping scenes in my flash movie. At first i put the action in a "actions" named layer and a link to a button.
So basicly when scene1 loads the frame 1 action is "stop ();". The viewer clicks on button1 which has a code of ;
on (press) {
gotoAndPlay ("10");
}
At frame 10 a 15 frame animation plays and finishes at frame 25. Actions for frame 25 is (keyframed ofc) ;
gotoAndPlay ("scene2", 1);
which wont work. I tried _root.gotoandplay etc and even scene1.gotoandplay and stil wont work. Then i assigned the action to the button itself and just wanted to see if i could switch to the scene by clicking on the button. No it wont work.
I'm fairly (actualy VERY) new to flash, so i might be missing something essential. What is it?
Goto And Play Scene 1 Don't Work?
I have created a menu, but I cant get it to link back to the main time line.
I created a movie clip called 'menu1'.
In 'menu 1', there is a button called 'home'.
I want the home button to link to frame 5 on the main timeline.
So, I entered this code into the button.
on (release) {
gotoAndPlay("Scene 1",5);
}
which I guess means 'goto scene 1 frame 5 and play'
pressing 'home' just continues the play in the current scene.
I also tried the following code,
on (release) {
gotoAndPlay("Scene 1", _root5);
}
and this does nothing.
I read the book, and did exactly as it said, but it doesn't work.
I have included the code, so please see for yourself.
If anyone can solve this problem, or offern some alternative action, I would really appreciate it.
Tricia
Goto Scene And Then Play Movie.......
Ok i don't know why it doesn't work. All i want to do is that after uyou make a choice in the menue an animation starts. At the end of this animation you are directed to the 2nd scene. Ther another animation schould start inside another mc. I tried to sart the animation with a
_root.mc1.mc2.gotoAndPlay(2)
but it dosn't work. It stops when the selected Frame ist reached. In the upper case it stops at frame 2. If i write
_root.mc1.mc2.gotoAndPlay(17)
the movieclips jumps straigth to frame 17 but it doesn't start to play the mc. Why???
Thanks for any help and sorry for my bad english, i have a headache from a Party yesterday.
Greetings frome Germany
Juergen
Goto And Play Previous Scene Possible?
Hey guys,
what I want (to be able) to do is a website composed in different scenes, so I can have the layout of the page 'morph' into the next scene without any breaks. For example, the index page layout will 'morph' into the Gallery page, Index is scene 1, Gallery is scene 2. Thing is, I cant seem to go 'backwards' to a previous scene, regardless of what scene I tell flash to goto and play, it always plays the next scene in order. Any suggestions?
Goto And Play Previous Scene(s) Possible?
Hey guys,
what I want (to be able) to do is a website composed in different scenes, so I can have the layout of the page 'morph' into the next scene without any breaks. For example, the index page layout will 'morph' into the Gallery page layout, Index is scene 1, Gallery is scene 2. Thing is, I cant seem to go 'backwards' to a previous scene, regardless of what scene I tell flash to 'goto and play', it always plays the next scene in order. Any suggestions?
Button In MC Won't GoTo Play Frame In Scene
i am fumbling my way through scripting and need help.
I have a button in a movie clip, which is in another movie clip, which is on a layer in my scene. I want that button to go to and play a frame in that scene.
going to that button in the first movie clip and telling it to GoTo and play frame 15 isn't working. I have tried telling it both "curent scene" and the scene's name.
is there some sort of scripting that I need to know to get the movie clip's buttons to control the scene?
-josh
I Would Like To Play And Then Goto Scene Only If Button Event
I would like to play and then goto scene only if button event is true
so is there someone who can help me to build the script to do so
example: scene1 is playing and stoping into the midle
i have 3 buttons
if one of these is click the scene1 continue to play and
at the end goto the scene coresponding to the button clicked.
I have no idea to make it work
Two Buttons: Play X Frames - Then Goto Scene X
Hi everyone
I´m a NEWBIE, so please help me out on this one... Help would be very much APPRECIATED!
Quest:
Lets say I have two buttons.
When pressing the first button, I need the animation to continue for 10 frames - then move to scene 1.
On the second button I need the same animation to continue for 10 frames -
then move to scene 2.
I would love if u told me the easiest way, cause I´m really not much into code! I tried searching but didn't come up with any answers, I could understand.
Tnx in advance - Miguel
If (whatever="hell Yeah") Goto And Play Scene 2? Won't Work.
Hey guys!
I have a movie clip which is retrieving like 8 different variables. Anyway all of that works fine. What I am trying to do is go to the next scene when all variables read "yes".
I have the variable-reading part correct, because I did a test with a movie clip visibility. If all variables are equaling "yes" the movie clip turns visible. This works fine, so I know it is not a problem with my "if" statements, or my variables.
Any other suggestions? I've tried simply "nextScene" and of course _root.gotoAndStop("Scene 2", 1) but to no avail.
THANKS!
I am posting a lot today, LOL.
Life as me trying to do a simple simulation- argh!
[Edited by skitten78 on 03-19-2002 at 04:44 PM]
Goto Movie(goto Scene)
hi, i made a scene (at the end of it (frame 560) i made a menu of buttons), when i click one of the buttons, a movieclip should appear (on(release){gotoandplay(561)}). At the end of the movie clip i put a script(gotoAndPlay ("scene#2", 1) that it should go to second scene. but it doesn't work. the movie plays but it repeats itself. do i have to add something else in the script!? please help, thanx!
On Release - Finish Scene - Goto Scene?
I have a navigation scene with buttons that is 100 frames but stops to allow navigation at 50.
What is the correct script to add to the buttons that allows me to finish the current scene to frame 100, then go to required scene??
Help is greatly appreciated.
Thanks,
Nick
Play Next Frame In The Current Scene Then Go To Play Other Scene
Hello !! Everybody
I'm minny. I'm the new one who use flash ^_^
I don't know how to write this action scirpt about to play next scene -_-
How can i do ??? In the scene 1, when push the button (that it is menu), i want it play next frame in the current scene and then it go to play in the frame 1 in other scene. I have 5 menu, Each menu in their scene. How can i write this script ???
Help me please...eeee
Thank you :-)
How To Script: Play 5 Frames Then Goto ? And Play
How do I tell Flash to play five frames and then goto somewhere else and play?
Also, how can I tell Flash to play five frames and pause for 4 seconds and then play again and pause for 4 seconds without creating stop actions on frames?
thanks everyone
Here's a link to my very first flash site, let me know what you think...
http://idisk.mac.com/michalp/Public/vsoh6.html
Goto Scene
When the end of a movie clip is reached, I want a particular scene to play. So on the last frame of the movie clip, I have:
gotoAndPlay ("Scene 2", 1);
But this doesn't play that "Scene 2" for me. It just plays the same movie clip again. This also happens when I place a button in the movie clip with:
on (release) {
gotoAndPlay ("Scene 2", 1);
}
How do I get this "Scene 2" to play when that movie clip reaches the end, or when the button is pressed? I hope someone can I'm just a newbie at this... thanks for your help.
Goto From A MC To A Scene
Hi,
I hope you can help me with something:
I want to go from a MC to a Scene and I know how to do it if the Scene I want to go is the First One:
on (release) {
_root.gotoAndStop(1);
}
But the problem is that I want to go to Scene 2 and not to the first one.
I found something like this in this page:
http://iat.ubalt.edu/courses/old/pbd...oProblem.shtml
But since I don't know much about ActionScript I don't how to code all the "set a value in a global variable, then perform some statement such as _parent.gotoAndPlay" stuf
Can someone make the code from what's being said on the url above
Thanks for the help!
Goto Scene
hello im just wondering if any one could help me i am designing a game an want to make it jump to anothter scene after 20 seconds
i have a timer all set up but cannot get it to work.
the variable name of the timer is seconds and the scene is called high.
i have tried to
if(seconds = 0)
gotoAndStop("high","1")
it doesnt work
Thank you
Goto Scene At End Of FLV
I have an flv video playing from a FLV Playback component. I am trying to have the movie goto the next scene at the end of the FLV video. I have go through numerous tutorials online to get the action to do this, but to no avail. I have tried both addeventlisteners and NS. Can someone please tell me the easy way to have the movie advance to the next scene after the flv and where the AS has to be to get the movie to function properly.
Thanks, I appreciate your help.
Goto Different Scene.
could somebody please give me the actionscript for making a button goto a different scene. thanks in advance.
Goto Different Scene.
could somebody please give me the actionscript for making a button goto a different scene. thanks in advance.
Goto SCENE
Hello folks.
I have a file im working on and it consists of two scenes. The first is the intro animation, the second is the main page (buttons and wotnot).
The screens for each button are contained it certain frames in scene 2, frame 1 is the main menu, frame 5 is another menu etc... and each button works by giving a gotoAndStop command.
The problem I am having is that the initial buttons I have work. They are a button object on the main stage (scene2). I am attempting to have animated buttons like in the 'flash source files - icons' example.
This requires that the button be turned into a movieclip, which leaves the button commands on the button inside that MC.
This seems to have totally stopped the gotoAndStop command from working.
I have tried changing it to _root.gotoAndStop but it jumps right back to scene1. How can I get it to do a _root.gotoAndStop for scene2.
There we go, probly very easy.
Thanks guys.
Gaz.
Flash Won't Goto The Next Scene
i have scene 1, frame 1 with an actionscript that does a text effect, and then at the end i have it go to scene 1 frame 2. then i have scene 1 frame 2, gotoAndPlay ("Scene 2", 1);, but flash will not goto scene 2 and play frame 1. i have tried a lot of stuff, i can't figure it out. any help would be nice. thanks.
Goto NEW SCENE Simple Ins´t It?
I have these scripts over a button inside a mc called "enter"
on (press) {
_root.gotoAndStop ("bipede", 1);
}
I want my movie to go to the scene "bipede"
I seems to be simple but I can find the deal
Thanks
Goto Other Scene On Specified Condition
Hi All,
I've create a small "find the 7 differences".
It's 1 scene and 1 frame long. The number of differences found is alse shown.
The code behind the "secret area's" is:
----------------------------------
on (press) {
if (Click1 <> 1) {
Aantal = int(Aantal)+1;
}
}
on (release) {
Click1 = "1";
}
----------------------------------
The frame action is:
----------------------------------
Mouse.hide();
startDrag ("Arrow", true);
----------------------------------
Here's my problem..
When I add a second scene which shows "bravo, bla bla...", I can't get the movie to wait on the first frame of scene1 till the var Aantal = 7 ..
I'm very new to flashscripting (started yesterday) so it's probably a small function I'm overlooking.
The current-application (without scene2) can be seen on:
http://www.altijdfeest.com/various/7verschillen.asp
Thanks in advance!
(sorry for the crosspost on Flash 4 Actionscript
Goto Scene With Keyisdown
I Need help,
I have an mc with this script:
if (key.isdown(key.space)) {
if (_root.copter.hitTest(_x, _y)) {
_root.gotoAndPlay ("beach", "1");
}
}
but it didn't go to scene "beach"
what's wrong with my script ? Anyone can help me ..?
Thanks in advance
Hairos
Goto Is NOT Going To Correct Scene
possibly bug .. dont know.. but:
I have two scenes .. one preloader, one movie.
the preloader does its thing .. sucessfully.
then says
if (getBytesTotal == getBytesLoaded){
nextScene();
}
I have also tried different commands like goto play scene, just good ole 'play()'. The problem is, when the movie DOES goto the next scene .. ANY code in the proper movie that has a 'gotoAndPlay(n)' command doesn't refer by deafult (which it should) .. to the current scene .. it refers to the preloader scene. There is a work around if I point to frame labels .. but I shouldn't have to edit my other movie .. because as you could imagine, some movies have Bajillions of gotoAndPlay refernces .. Any ideas.
BIG Problem With Goto Scene Within MC?
I know, I know...
This may have been cover somewhere on the groups but I have searched to no avail!!!
I have a menu(MC) which displays buttons which when clicked should goto a scene in the main movie. NB: I have no other movies loaded. I just want to go to another scene.
Button inside a MC do not seem to goto anywhere?!
Here is the file http://www.mlic.co.za/new/movie1.fla
Thanks guys
Help:goto Scene Onpress
how would i go about doing a onpress gotoAndStop("scene",1);
do i have a good start on my site..do u like
my site
Goto Scene,frame,MC
How can I combine these actions:
gotoAndPlay("Scene 2", 1);
_root.mc.gotoAndPlay(2);
So that when I click the button, the movie goes to the mc in another scene with a defined frame.
Greetz
GoTo A Diferent Scene
i´m running Flash MX on the Windows 2000 server, and like to know if is any conflit. I have one more question, i had a buntton inside of a movieclip and i want to give him an action to go to a diferent scene. How can i do that?
Button Won't Goto A New Scene..
I've suddenly accumulated this problem in my action scripting where I'm trying to assign a button an onmouse event script that will send the movie to the next scene, and the scripting that I've been using before suddenly won't work for this document. When I click on the button that should be going to the next scene, it just replays the current scene. I have no idea what the problem is, could someone help me out?
Here's what I currently have, let me know if it's wrong:
on (press) {
gotoAndPlay ("<scene 2>", 1);
}
Goto Scene Not Working
I have a movieclip with another mc in it with code on it so when you press enter it goes to a scene. Theres about 131 scenes and I have the mc duplicate and at differant times in the timeline so that at one frame if you press enter it will goto one scene, and at another frame if you press it it will goto some completly differant scene. But my problem is that enter is acting like a play command. Just going to the next scene. So i made it on release, instead of enter. And now it doesnt go anywhere. Please i need help fast, this huge project is due tomorow and it's a final
Actionscript To Goto Next Scene?
Im making a little navigation screen with an intro in the same scene.. the intro would play and in the end it would have an "enter" button.. when pressed, I want it to goto the next scene, which would reveal the navigation bar.. is there a way to do this with action script?
Problem With Goto Scene
i created button and put it into a movieclip. if i klick on it, the movie should jump to the other szene, but it doesnt. so i tried the button outside this movie on the normal stage. here it works, but i need it in this movie.
the code i've used:
on (release) {
gotoAndPlay("aboutme", "1");
}
please help me
__________________-
www.gluszko.de
Goto Scene Problem~
hi, im making a basic flash webpage. i set all the different pages to different scenes. (so 1 scene = 1 webpage).
for the buttons, im using the "SubMenu", so the button splits into like... 5 other buttons which link to different pages. the problem is, i try to set the buttons to "goto scene and play on release", but it wont work. it stays in the same scene, and the submenu closes.
im not sure if you understand what im talking about but if you kno how to link scenes using submenus, please help.
thanks for your time
Tell Target Then Goto Scene?
Ok, here's my problem:
I have a button with this action
on (release) {
tellTarget ("targetclip") {
gotoAndPlay(5);
_root.gotoAndPlay("label");
}
}
What I want is to play the targetclip first THEN goto the other scene.
This script ignore the telltarget and jump directly to the scene.
How do I make it do it in the right order.
How To Goto And Stop To A Scene?
I just downloaded the trial verson of Macromedia Flash MX Professional 2004, and I made a button, and I want it to go to Scene 30 when it is clicked on.
But when I choose that from the Behaviors, the only option it lets me choose from is Frame, not scene.
So what do I have to do to make it go to scene 30?
I have searched for it, but I couldn't find the answer. Sorry if it has already been asked and answered.
Thanks
[F8] Goto Scene After Xx Seconds Help
Hello, I almost have this working, just need a little help. I have a movie with multiple scenes. I have next and back buttons set up. If noting is clicked, it will automatically change scenes after 12 seconds. My problem is that I want it to move to a specific scene, not just the next scene. As of right now, after 12 seconds it moves to the next scene no matter what scene I specify in the gotoAndPlay command. If anyone could tell me how I can tell it to go to a specific scene I would really appreciate it!
PHP Code:
stop();
var intervalId:Number;
var count:Number = 0;
var maxCount:Number = 0;
var duration:Number = 12000;
function executeCallback():Void {
gotoAndPlay("Scene 2");
if(count >= maxCount) {
clearInterval(intervalId);
}
count++;
}
function beginInterval():Void {
if(intervalId != null) {
trace("clearInterval");
clearInterval(intervalId);
}
intervalId = setInterval(this, "executeCallback",duration);
}
beginInterval ();
beginInterval ();
beginInterval ();
[F8] Goto Scene On Video End
Basically, I have a video as an introduction, its 4 minutes long roughly. There is an option to skip to the homepage. What would be the actionscript for, on video end goto and play the homepage. Any help, much appreciated.
Goto Scene Problem.
Hi
I am having a problem jumping to the right scene when i press and release the button. I set up a simple code to test going to Scene 3 from Scene 1, but instead to goes to Scene 2, even though the code is saying scene 3.
Here is the code i am using.........
moveUp.onPress = function() {
rocket.onEnterFrame = function() {
this._y -= 4;
}
}
moveUp.onRelease = function() {
gotoAndPlay("Scene 3");
delete rocket.onEnterFrame;
}
stop();
Goto Scene From Nested Mc
on the main stage I have a mc named "main" and a button names "b1". Nested inside "main" is an mc named "img1". When I press "b1" main.img1.gotoAndPlay(66); and lands on frame 88. Once the "main.img1" lands on I need it to goto Scene 2 frame 1.
I tried to place this code on frame 88 but got nothing.
_root.gotoAndStop("Scene 2", 1);
also tried
_parent._parent.gotoAndStop("Scene 2", 1);
what am I doing wrong?
Goto To Frame 2 Of Scene 1 Within A Mc? Please Help
I searched the forums but didn't find a match...
What I want to do is make my intro mc (which is on frame 1 of scene 1) automatically goto frame 2 of scene 1 once the intro ends. The simple goto statement won't work because my intro is in it's own mc.
I have attached a simple version of what i'm takling about. If someone could "solve" this and re-upload it, I would greatly appreciate it!
Thanks!
Goto To Frame 2 Of Scene 1 Within A Mc? Please Help
I searched the forums but didn't find a match...
What I want to do is make my intro mc (which is on frame 1 of scene 1) automatically goto frame 2 of scene 1 once the intro ends. The simple goto statement won't work because my intro is in it's own mc.
I have attached a simple version of what i'm takling about. If someone could "solve" this and re-upload it, I would greatly appreciate it!
Thanks!
Button Goto Next Scene...
hello all,
I'm creating a button in Flash to goto and play the next scene on release.
the code is:
on (release) {
gotoAndPlay( 3,1 );
}
it gets error.
please help me out. thanks!
Dynamic Goto Scene
is it possible to tell flash to go to a scene dynamically? instead of using frame labels can i just use scene names and set a gotoandplay to go to a scene that is dynamic?
Play The Rest Of Current Scene, THEN Gotoandplay Another Pre-determined Scene
Hi,
Im my scene contains 6 buttons, I want button '1' to play the rest of the current scene (for example scene '0' then goto and play scene '1'
I want button '2' to play the rest of the current scene (for example scene '0' then goto and play scene '2'
I want button '3' to play the rest of the current scene (for example scene '0' then goto and play scene '3'
etc....
any ideas? this is for actionscript 3. My current script just makes the button goto a certain frame, can I edit it? here it is:
stop();
thumbbtn1.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler1);
function mouseDownHandler1(event:MouseEvent):void {
gotoAndStop(2);
}
thumbbtn2.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler2);
function mouseDownHandler2(event:MouseEvent):void {
gotoAndStop(3);
any help greatly appreciated.
Ger
|