[F8] GotoAndPlay Working For One Item, But Not For Other
Hi guys, lets see if you can help me I made an animation inside a MovieClip like this
The problem is that when I call gotoAndPlay(5) I only see the animation of the border layer. The BackMC (a movieclip) stand in frame 1.
Do you know why is this happening? Thanks in advance.
FlashKit > Flash Help > Flash ActionScript
Posted on: 10-07-2006, 07:25 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
MY1stPOST...Action Scripting Question:How To Play 52 Frames THEN GotoAndPlay An Item
I just signed up today and look forward to helping others and receiving help in this forum.
My question is pretty basic, I just need to get the action scripting code for it.
I need to know how to add an action script that tells a link button when it is clicked to play forward 50 frames AND then go to a different frame marker.
Currently the action scripting I have on a button is...
on (release) {
gotoAndPlay("D Header");
}
This link is correct and it is what I want to happen, but before it goes to "D Header" and plays it, I want it to play 50 frames forward from where it is, and then go to "D Header" and play until it hits my "stop" marker.
So, basically I need scripting that says...
on (release) {
<play forward 50 frames and then>
gotoAndPlay("D Header");
}
Any help would be greatly appreciated. I'll be checking back all day, and so on, until I get a response.
THANK YOU!!!
jed
[CS3] RemoveMovieClip Not Working For One Particular Library Item
Hi there,
I built a website for our company, but because my boss kept adding stuff as I was building, the navigation-function became a total mess. On top of that, the need has risen to make the site multi-lingual, and I would like to get the back-button and deep-linking to work properly.
So, I decided to rewrite the navigation-function using the exanimo stateManager. The site structure basically has two levels: Six main sections (L1), most of which have subsections (L2). All these "pages" are library items that get attached to a holder MC (L0). So for instance, the first page is built by attaching "home_NL" to L0 and calling it L1, and then attaching "home_welkom_NL" to L1 and calling it L2.
This all works fine, until I've clicked “Voices”. If I click a section after that, the L0 gets faded out, but L1 is not removed. And since the function then tries to attach a new library item as L1 and will not continue until it is loaded, navigation simply hangs.
Unfortunately “luister_NL”, which is loaded when you click “Voices”, is a fairly complex movie clip (by my standards, at least). It allows the visitor to listen to samples of our voice-talents based on language, style and gender. These can also be selected and “ordered” through a form.
Something in this movie clip is preventing Flash from removing it from the stage, but I can’t figure out what.
I’ve uploaded the fla so you can check it out if you want.
Any suggestions on what could be causing this behaviour would be very welcome.
Thanks in advance!
Yours,
Andra
Menu Item / Button Not Working. Multiple Layers / Movies
Hey Everyone, I'm New to this forum, but ive talked to a few people here, and they told me I should join so here is my question:
I have Created a Website by Combining Multiple Templates and what not, and adding my own scripts to it, and well here is the domain the site is currently launched under: http://www.royalgorvideo.com and the problem is that When someone clicks on portfolio then they select a category, then video or photographs, there is no way to go back to the portfolio page with the different categories such as weddings, commercials, concerts, etc. because all those other movies are loaded on top of the main page, and there is page checking on the button, and when i remove it, it looks liek it loads the portfolio main page for a split second then goes away, if you guys have any idea i would appreciate it, about 12 people tried to figure this out, and no one had an idea, they all tried the same stuff i tried, so hopefully i can target more people on here, if you need the source i can upload it or u can decompile it, you can also instant message me on AIM at ProDJAllenV3.
here is the AS on the button:
on (release)
{
if (_root.link != num && _root.animation == 1)
{
unloadMovieNum(3);
unloadMovieNum(4);
this.gotoAndPlay("s3");
_root.animation = 0;
_root.link_prev = _root.link;
_parent["item" + _root.link].gotoAndPlay("s4");
_root.link = num;
_level0.pages.page.play();
} // end if
}
num is like the page number it needs to load, and thats defined in a symbol before this one...
There may be other errors in this for example mail script i'm using the _visable an its not working on a "thank you your message has been sent" text field, or the pop-up for privacy notice, if u guys can find out why those arnt working either that would be great...
Id appreciate anyone's help here...
-Allen
Thanks in advance
GotoAndPlay Did'nt Working
I hav a movie clip which contains two buttons in it and I hyperlinked one of the button to a different screen
(eg. gotoAndPlay ("Scene 2", 1)).
I placed this movie clip in main Scene, but link did'nt worked out.
Can anybody help me????
Bye
Sailesh
If & Else GotoAndPlay Not Working
Hi everyone!
I'm sticking a script on the end of this message. The problem I'm having that I've been struggling with for a couple hours now is that when "this" has reached an alpha of 100 and it goes to play from frame 2 in "lines," the action STOPS, it does not PLAY. There is no stop action in the "lines" movie. But no matter what I do, the movie stops!
Is there something I'm missing in my else command that is causing this problem? HELP! Thanks!
Ben
onClipEvent (enterFrame) {
if (this._alpha<100) {
this._alpha += 10;
} else {
_root.movie.lines.gotoAndPlay(2);
}
}
Gotoandplay... Not Working
Hi guys and gals,
I'm wondering if anyone can help me...
I am trying to use a generic navigation system thoughout my entire flash animation, the animation is structured in to 7 scenes with there navigation the same on each scene.
the movie has a little intro to build the page, then stops, when you click on a link it sets a varible called "nextpage" then plays the current scene to the end, ie:
on (release) {
var nextpage
nextpage = "page2";
_root.gotoAndPlay(166);
}
and at the last frame of the scene it has a "if" statement to tell the flash file which scene to play next, depending on the value in the "nextpage" varible, ie:
if (nextpage == "page1") {
_root.page1.gotoAndPlay(1);
}
else if (nextpage == "page2") {
_root.page2.gotoAndPlay(1);
}
... and so on...
the problem is currently it does not matter which link to click on it will go to frame "166" of the scene "page1", play to the end of the scene, then play the scene "page2" until it gets to the stop point (frame "165"), and when i click a link again it jumps to frame "166" of "page1" and repeats it's self...
any ideas?
cheers
Alan
GotoAndPlay Not Working For Me :(
ok i have my scene called main, and i have a frame labelled dedication
now, say it's on frame 1 of the main scene, and i have a movie clip
when that movie clip ends, i want it to go to frame 2, which will contain the second movie clip, and frame 2 is labelled dedication
so, in the last frame of my first movie clip i put
gotoAndPlay("main", "dedication");
so it will go to the frame labelled dedication (ie frame 2)
but when i run it it just keeps looping the first movie clip
any help?
GotoAndPlay Not Working....please Help
if (whereTogo == welcome) {
gotoAndPlay("welcome");
}
this code is not working for me. I know the var whereTogo is set to welcome but when it hits this frame, it just continues on with the movie, not going to the frame labeled "welcome"
any thoughts?
GotoAndPlay Isn't Working
Using Flash MX... trying to nake different mcs play depending on what key you press... right now only the 1 and 2 keys are set up... when i tried this:
onClipEvent (enterFrame) {
if (Key.isDown(Key.getCode(49))) {
Play();
}
}
it played both the answer_1_hidden and answer_2_hidden clips, so i tried changing the code to target each movie clip specifically but it doesn't do anything now:
onClipEvent (enterFrame) {
if (Key.isDown(Key.getCode(49))) {
_root.answer_1_hidden.gotoAndPlay();
}
}
Any ideas?
Thanks
_DracoLord_
Gotoandplay Not Working
ok, i'm having trouble making a mousevent work. Take a look, the button WHO is supposed to go to the scene WHO, but it doesn't work. For the life of me, I can't figure it out.
the file is located here... help would be much appreciated.
http://deserdragon.net/almostp2p/moduleFLA.fla
im not sure if that URL is resolved yet, i just signed it up for a client, but try
http://restandeffect.com/almostp2p/moduleFLA.fla
GotoAndPlay Not Working Again
I have a MC that is imbedded into another MC. Now at the end of this MC I want it to go to another MC that is also imbedded.
I’ve used the code
_root.mymenu.mainmenu.gotoAndPlay(1);
But when I play this movie it doesn’t seem to work. I have named all of the instances correctly, so am confused why it isn't working. Could it be because I am trying to navigate to a MC that is inside a MC, or because i am trying to go backwards.
This navigation is the only thing that needs doing for an assignment, which needs to be in tomorrow
Cheers
GotoAndPlay Not Working
I have been building a preloader with script as follows:
Code:
onClipEvent (load) {
total = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
percent = int(loaded/total*100);
gotoAndStop(percent);
boxpercent = "_loading " + percent + "%";
if (loaded == total) {
this.gotoAndPlay(102);
}
}
The problem is that the last "gotoAndPlay" is not working. It just jumps to that frame and stops.
I have another preloader almost exactly alike with a "gotoAndStop" at the end, but it won't stop, it just causes the movie to play over and over.
Does anybody have any ideas as to what is happening? Any help would be great.
Thanks in advance,
Gotoandplay Not Working
Hi There,
I am new to flash and have created a flash navbar, when a user rolls over the a specific symbol, an animation is supposed to play. There are 6 different possible animations (just circles following a guide until they all come together over the circle that is being rolled over), but only one works correctly and the other 5 do not.
The code is exactly the same for each animation except for the fact that the gotoandplay method points to different frames for each roll over animation.
The one that works is which ever one is located on the top layer, which is quite strange.
I have tried splitting them up into different scenes and putting them on the main timeline but the same result every time.
Here is the code I am using for the symbol that is being rolled over (obviously the frame number changes for each one):
this.circles_contact.onRollOver = function() {
gotoAndPlay(82);
};
this.circles_contact.onRollOut = function() {
gotoAndPlay(1);
}
Can anyone help at all?
Thanks,
[AS2] GotoAndPlay Not Working
After slowly going crazy, I have decided to post my problem here.
It seems to go to the right frame, but it STOPS...
There is no action script code in the frame it's sent to.
Code:
this.onEnterFrame = function() {
_root.maincontent_tb = _root.dbi_MC.mainContent_MC.getBytesTotal();
_root.maincontent_tl = _root.dbi_MC.mainContent_MC.getBytesLoaded();
_root.maincontent_loaded = _root.maincontent_tl/_root.maincontent_tb;
_root.maincontent_percent = Math.round(_root.maincontent_loaded * 100);
if (_root.maincontent_percent == 100){
gotoAndPlay ("fadeout");
_root.dbi_MC.loadingScreen2_MC.gotoAndStop (5);
} else {
gotoAndPlay ("recheck");
}
};
The zipped fla can be found at:
http://www.sunsigns.ca/newsite/sunsi...s/dbi_main.zip
The movie/page at:
http://www.sunsigns.ca/newsite/sunsi...mainpage.shtml
the code I've posted is found in the Movie clip "sceneTransition" at frame 30.
any comments/help is greatly appreciated.
--
I forgot to NOTE... if I tell the gotoAndPlay to go to say... frame 45. It will stop on that frame.
And if I put a frame action on that frame that says "gotoAndPlay(46);"... it will go to frame 46 and stop. Ultra annoying... ;p
GotoAndPlay Not Working....
i have a movie clip on the stage with this action attached to it:
Code:
onClipEvent(enterFrame){
this.onRelease = function(){
trace("button clicked");
gotoAndPlay(1); //back to the first frame
}
}
when I click the button I get the trace "button clicked" but it doesn't return back to frame 1. There's a stop(); function in frame 1 so it should just go there and stop with no problem.
I've tried _root.gotoAndPlay(1)...... _parent.gotoAndPlay(1)... and even gotoAndStop(1);
all I get is the trace calls but it doesn't return to the first frame on the timeline....
GotoAndPlay Not Working
hey,
my preloader is in a seperate scene. once all the bites have loadered it loads the main scene but goes to frame 3, skipping frame one and two.
Code:
var siteLoaded:Number;
var currentBytes:Number;
var totalBytes:Number;
function onEnterFrame(){
totalBytes = getBytesTotal();
currentBytes = getBytesLoaded();
siteLoaded = (currentBytes / totalBytes) * 100;
movLoadBar._xscale = siteLoaded;
if (currentBytes >= totalBytes){
gotoAndPlay("main", 1)
}
}
stop();
i've commented out all the code on frame 1 in the main scene except for a stop. i can't see the problem. if you can i'd appreciate the help.
thanks
adam daly
GotoAndPlay Not Working
Hey All! From the main timeline I am trying to tell a movieclip to goto a certain frame (labeled gotoFrame) and play. It does get there but it just stops instead of playing.
CODE:
myClip.gotoAndPlay("gotoFrame");
Anybody encounter anything similar?
GotoAndPlay Not Working
I've got a button with 3 frames, one for when the button is up, one when it's down, and one when the cursor is over it. If I put it on the stage, it works fine using gotoAndStop(1), gotoAndStop(2), etc, but when I load it dynamically using create and attachMovie, it shows on screen, but I can never get the frame to move off frame 1 using goto functions.
FYI, the button is placed in an external library, and it is created as a type of a class I created, which exteneds MovieClip to add onRollOver functionality.
GotoAndPlay Not Working?
I have tried behaviors and doing it by hand and nothing seems to work. I put this script directly onto my movieclip "button". Im trying to get it to go to a scene "events" frame 1 and i just cant seem to get this to work. Im pretty new to actionscript but something this basic shouldnt be a problem, I just cant solve this one.
Thanks for you help,
Michael
on (rollOut) {
this.gotoAndPlay("1");
}
on (rollOver) {
this.gotoAndPlay("19");
}
on (release) {
gotoAndPlay("events", 1);
}
I CANNOT GET GotoAndPlay Working...
simply, i am wanting to use
ActionScript Code:
on (press) { gotoAndPlay ("9", "1");}
and it just doensn't work, all it does is either reload the frame i am on, or continues to the next scene.
Can someone please tell me why this is not working!?
PLEASE DO NOT tell me it is in the help files, or online somewhere, because i cannot find a helpful resource, which is why im posting on this forum, so from past experience, I would appreciate it if you would not criticise me for not being able to find it... but thanx anywayz ppl. (and also don't tell me not to use abbreviations) i can spell, i find is easier to use some little shortcuts.
GotoAndPlay Not Working
I have a custom function with parameter. I'm trying to pass the parameter to the gotoAndPlay as follows.
This is where the function is called...
Code:
myButton_btn.onPress = function() {
myFunction("Apply");
}
This is the function...
Code:
myFunction = function (fLabel) {
trace(fLabel);
gotoAndPlay(fLabel);
}
Basically "Apply" is a frame label that I'm trying to send the playhead to. The fLabel paramater traces out properly, but the gotoAndPlay doesn't send the playhead to the appropriate frame label. It sends it to 4 frames before the end. It's really weird. Even if I add frames to the timeline, it still sends it to 4 before the end. I can get it to work perfectly in a "new" flash document, but not in my existing document. Do I have wrong syntax or is something possibly conflicting?
GotoAndPlay Not Working
Been a few months since I've done flash.. and I've been running into this problem with something I've been making.
I'm using a button to change scenes, with this coding with the button:
on(release){
gotoAndPlay("Game",1);
}
But when I click the button, nothing happens. The button changes to the Down frame, and back to the Up frame... but doesn't activate the code on release.
The button in question is the Play! button right at the beginning.
Since its too big to be uploaded on this post, here's the link:
http://www.angelfire.com/musicals/bleepblop/memory.fla
Thank you in advance for helping me out!
~Zhais
GotoAndPlay Is Not Working
loaded = int(_root.getBytesLoaded()/_root.getBytesTotal()*100);
if (loaded>=100) {
gotoAndPlay(6);
} else {
gotoAndPlay(2);
}
My gotoAndPlay is working like gotoAndStop();
It will redirect to the frame but not continue the play.
I have no Stop(); funtions on the frames to cause this.
Any idea?
I CANNOT GET GotoAndPlay Working...
simply, i am wanting to use
ActionScript Code:
on (press) { gotoAndPlay ("9", "1");}
and it just doensn't work, all it does is either reload the frame i am on, or continues to the next scene.
Can someone please tell me why this is not working!?
PLEASE DO NOT tell me it is in the help files, or online somewhere, because i cannot find a helpful resource, which is why im posting on this forum, so from past experience, I would appreciate it if you would not criticise me for not being able to find it... but thanx anywayz ppl. (and also don't tell me not to use abbreviations) i can spell, i find is easier to use some little shortcuts.
GotoAndPlay Not Working
I have a custom function with parameter. I'm trying to pass the parameter to the gotoAndPlay as follows.
This is where the function is called...
Code:
myButton_btn.onPress = function() {
myFunction("Apply");
}
This is the function...
Code:
myFunction = function (fLabel) {
trace(fLabel);
gotoAndPlay(fLabel);
}
Basically "Apply" is a frame label that I'm trying to send the playhead to. The fLabel paramater traces out properly, but the gotoAndPlay doesn't send the playhead to the appropriate frame label. It sends it to 4 frames before the end. It's really weird. Even if I add frames to the timeline, it still sends it to 4 before the end. I can get it to work perfectly in a "new" flash document, but not in my existing document. Do I have wrong syntax or is something possibly conflicting?
GotoAndPlay Not Working In MC
I have a MC instance that functions as a button, in order to get the proper button animation I need. I use a gotoAndPlay(scene, frame) function, but the movie won't goto and play the other scene upon mouseclick. Any ideas? Here's my button:
onClipEvent (load) {
stop ();
var speed = 1;
var direction;
}
onClipEvent (enterFrame) {
if (direction == "ff") {
gotoAndStop (_currentframe+speed);
} else if (direction == "rr") {
gotoAndStop (_currentframe-speed);
}
}
on (rollOver) {
_root.oneOut.direction = "ff";
}
on (rollOut) {
_root.oneOut.direction = "rr";
}
on (release) {
gotoAndPlay("Commercials", 1);
}
The gotoAndPlay line doesn't work. BTW, My MC instance is named "oneOut". Upon button release, the clip plays from its first animation frame (in scene "Home"), but does not got to the "Commercials" scene.
-Wes
GotoAndPlay Isn't Working
hi,
I've put together a simple login page, but when people log in and I want to start a new segment, flash stops playing for some reason
this is my code:
stop();
userinput.restrict="a-zA-Z0-9";
passinput.restrict="a-zA-Z0-9";
//this will make it so the user can't use symbols
//that could mess with your database
Selection.setFocus(userinput);
status="";
this.onEnterFrame = function () {
if(_root.checklog == 1){
_root.gotoAndPlay(62);
}
if(_root.checklog == 2){
_root.gotoAndStop(63);
}
}
I assume the problem lies somewhere with this.OnEnterFrame, it shouldn't repeat itself at every frame I think.. I'm sure there's a different way to do it but I didn't write this script so maybe some of you could help me out
_root.gotoAndPlay - Not Working
Hi,
I had an action that was at the end of a movie symbol that made it leave the movie and go to the main timeline and play at the label I had named "Fade1". It worked fine.
The script was:
stop ();
_root.gotoAndPlay("Fade1");
But ever since I moved the nearly all the frames (including the frame labeled "Fade1") that were on the main timeline and put them within another movie - it now doesn't work.
I thought it would still work considering that it's the only label in the whole ".fla" file that's called "Fade1".
What do I have to do? Is it because it's now on another "level" that it won't work?
Any help is really going to be appreciated.
Thanks
Blastbum
Button GotoAndPlay Not Working...
Hi. The code below is in a pretty big flash file, but I don't see any reason why this would not work.
I have multiple scenes and all the scene names are different; some labels/markers within different scenes are the same, but I don't see how they have any bearing as long as I reference the scene name to differentiate the label/markers from each other.
It's Actionscript on a button; the YKK-HQ in quotations is a scene within the .fla file. I have other buttons with the same code referencing different scenes (some with the following format: ("YKK-HQ","begin") for example... and none of them work.
Any suggestions?
- - - - - - - - - - - - - - - - - - - - - -
on(rollOver) {
_alpha = 100;
play();
}
on(release){
gotoAndPlay ("YKK-HQ");
}
GotoandPlay(variable) Not Working
I think I'm losing my mind. I've done this numerous times, but for some reason its not happening. In a preloader, I have a movie clip on the _root movie named 'dial' with 100 frames.
On the root movie I have 2 keyframes with these scripts:
1st frame:
total = _root.getBytesTotal();
loaded = _root.getBytesLoaded();
ratio = (loaded/total)*100;
percent = Int(ratio);
2nd frame:
if (percent == 100) {
gotoAndPlay(3);
} else {
gotoAndPlay(1);
}
tellTarget ("dial") {
gotoAndStop(percent);
}
For some reason the movie 'dial' is not stopping at whatever the percent loaded is. I have tried manually setting the percent to a certain number, ex, 35 to test it and 'dial' won't go to frame 35. Although if I put gotoandstop(35); it does, so I'm targeting the movie correctly. Am I insane?
__parent,gotoAndPlay(2); Not Working
Help. i know this is an easy fix, but I can't get it to work.
My maintime line has three frames. Frame 1 has a movie on it and a stop action.
After the movie plays, I want it to go to frame two on the main timeline, but it doesn't. I also tried _root, but that didn't work either.
What am I missing?
thanks in advance for any help!
GotoAndPlay Not Working With HitTest
Code:
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_root.thingy.gotoAndPlay(9);
_root.dawg = "hitted.";
} else {
_root.thingy.gotoAndStop(1);
_root.dawg = "unhitted.";
}
}
won't play. it got to that frame and stops. even a play() in the 9th keyframe of the mc wont do it.
GotoAndPlay() Action Not Working ...
Hi guys I have a movieclip on the stage called screen1_mc
Basically screen1_mc itself consists of a tweened animation which starts on frame 2 and ends at frame 20.
Frame 1 of this tweened layer is blank.
In this movie clip on the first frame of actions layer i have a stop() action. Then on frame 2 i have a blank keyfame and then on the last keyframe i.e 20 of the actions layer i also have a stop().
Now the problem is in the main movie(which consists only of one frame) when i put the following script in the actions layer:
Code:
screen1_mc.gotoAndPlay(2);
It does not work..instead its just like i used the gotoAndStop(2) action. As it just STOPS at frame 2 of the moveiclip..instead of playing the mc animation.
However if i use the following code instead it DOES work:
Code:
button_mc.onRelease = function():Void{
screen1_mc.gotoAndPlay(2);
}
Any ideas why this is happening? Thanks in adavnce
Variable == 0 GotoAndPlay Not Working
Hi im making my first flash game and i have two major part of code which I need to figure out
this being the first one
what i need it that when the variable money (for intance) reaches 0 or below for the timeline to advance to another frame
If(_root.money == 0) {
gotoAndPlay(2); or gotoAndPlay("gameover");
}
but its not working =(
I think it might be because of the way I ahve my variables declared but, it could be any number of things as i said this is my first time programing a game.
the way my code reads currently is on frame 1, on layer actions
stop();
var bad = 0;
var time = 60;
var money = 100;
if(_root.money == 0){
gotoAndPlay("gameover");
}
im gonna include my fla incase you wanna take a look to see exactly what im trying to do.
GotoAndPlay Scene From MC Not Working
hey all
this is my first post here, so i hope am not asking something asked before...
anyway, here's my problem:
i'm doing a flash movie that's made of several scenes
the main (1st) scene is called "lebanon", it contains a small intro movie and the last frame is a map with certain regions
each region is a different movie clip,
within these movie clips i have a layer with a button having only the hit frame, and on another layer some animations which occur when the mouse is dragged over/outside the button
the image here illustrates how these movie clips are setup:
(the 1st layer has stop(); actions on frame 1 and 5)
now my problem is:
the 'on release' part of the button is not working but the rollover/rollout is,
i want when the button is clicked to go and play another scene, but it's not working...i click and nothing happens
here's the actionscript:
on (release) {
gotoAndPlay("mt_lb", 1);
}
so how to jump to another scene from within this button?
i hope this is an easy problem and i was able to put it in correct words
Effect.gotoAndPlay(106); Not Working
effect.gotoAndPlay(106); not working Post #1
I want to make my movie clip with the instance name of effect start at frame 106 when it goes to the end frame from frame number 1. the effect movie clip is located inside a movie clip with the instance name of all.
So far I have tryed both these codes in the last frame of my movie clip named all.....
effect.gotoAndPlay(106);
and
_root.all.effect.gotoAndPlay(106);
Neither of them have worked.
What is the problem and how do I fix it?
GotoAndplay/Stop Not Working Ne More
Hi,
I created a movie with several nested movie clips. within these movies are stop actions to prevent the clips from playing at the wrong time. I created the gotoAndPlay/stop functions to play these clips at certain points of the animation. Now at first these actions worked smoothly and exactly as i wanted, however after several test movies, some of the gotoandplay/stop functions stoped working. Has ne 1 ever ecounterd this problem is there a way repair these actions without recreating the whole movie? i tried rewritting the scripts and still does not work.
thx
GotoAndPlay Script Not Working
Hey hey.
So here's my problem. I'm building my first actual flash site. I've had a lot of experience in other aspects of flash...just not a lot of scripting. My scripting attempts have been successful up until now. I have a button which I want, on release, to gotoAndPlay a different scene, first frame which I have named "about". This is the script I entered.
on (release) {gotoAndPlay("about", "1");
}
But, whenever I test the movie, it just...well...doesn't work. No error messages come up or anything...it just doesn't prompt the new scene. Any idea's why this might be? I'd really appreciate any help!
Movieclip.gotoAndPlay Not Working
i've been trying to make this work for the past several days, and nothing...
i have a button with an if/else statement block... if the play head is at frame 40 currently, then the play should be directed to the "Red" frame label within the movie clip called "MC", if not then the playhead should be directed to "Purple" frame label within "MC"...
i've tried writing so many different ways, including _parent, _root, etc. but it's just not registering at all...
Code:
on (release) {
if (_currentframe != 40) {
_root.MC.gotoAndPlay("Purple");
} else {
_root.MC.gotoAndPlay("Red");
}
}
also, Here is a small FLA file which shows you what i'm trying to do... i'm assuming that maybe i'm forgetting something like naming an instance, eventhough i've checked and rechecked...
any help would be appreciated.
CS4/AS2.0 GotoAndPlay Framelabel Not Working... Help?
Hey all, I'm a newbie on the forum and in Flash.
I've used it before to make a website, made my pages into scenes, and everything worked fine. Apparently, this doesn't work anymore (I used an earlier version of Flash) in CS4, and everyone is recommending to use frame labels. This doesn't work either.
This is a screenshot of my site right now.
The ActionScript is the exact same in all three frames on the actions layer you see in the screenie.
All I want is when clicking on the AboutUs button and WhatIsHypnosis button, that they go to the specified frame labels.
The only one that works is the AboutUs button. I can click on it and it loads the content that its supposed to,but the home (the logo) and the second button do not work. They are clickable, just nothing happens.
I've tried everything I can think of and that I have been able to find.
Changing the type of frame label has no effect.
Help please? I've been trying to fix this for a good 6-7 hours.
Screenshot:
http://img407.imageshack.us/img407/2372/picture8sq4.png
Thank you!
Why GotoAndPlay Or RemoveMovieClip Not Working?
This is killing me.
Why isn't this working?
ActionScript Code:
_root.attachMovie("the_window", "theWindow", _root.getNextHighestDepth());
_root.theWindow._x = 0;
_root.theWindow._y = 0;
_root.theWindow._width = Stage.width;
_root.theWindow._height = Stage.height;
_root.theWindow.gotoAndPlay(5);
The first frame of "theWindow" is blank (a block of alpha 0)...
The fifth is where it starts to fade in. and then stops at around 10.
Later... I try to remove the movie clip (as it interferes with other stuff)
But it won't remove either. I'm using this:
ActionScript Code:
_root.theWindow.removeMovieClip();
GotoAndPlay(variable); Is Not Working
I have a button, and two movie clips (one inside of the other).
When the button is clicked, it triggers the outer movie clip (instance name dnpm), and sets the variable sn to 2.
Code:
on (release) {
sn = 2
dnpm.play();
}
The outer movie clip has the inner movie clip (instance name dnp) moving offscreen and then back onscreen again (tweened). At the point where it is offscreen, I have an action (in dnpm) saying:
Code:
dnp.gotoAndStop(sn);
Since sn is set to 2, the inner movie clip (dnp) should go to frame 2. However, it does not.
I have attached the FLA. (Keep in mind the buttons and movieclips are dummies for what I am really doing.)
I have searched around, but to no avail. Keep in mind I am a beginning ActionScript user.
LoadMovie - GotoAndPlay(2) Not Working
Hi,
I want to load an external swf called test.swf and then gotoAndPlay frame 2 of test.swf. For some reason I am not able to do that.
HTML Code:
this.createEmptyMovieClip("holder_mc",this.getNextHighestDepth());
loadMovie("test.swf","holder_mc");
holder_mc.gotoAndStop(2);
I hope someone can help me with this.
Thanks
GotoAndPlay() Not Working As Expected
Hi everyone. Has something changed with gotoAndPlay()?
I am getting unexpected results. I have a simple 2 frame swf with nothing on the stage.
Frame 1 reads:
trace(currentFrame);
and Frame 2 reads:
trace(currentFrame);
gotoAndPlay(2);
The expected results are:
1
2
2
2
(etc.)
However I am getting:
1
2
1
2
1
2
(etc.)
Why is gotoAndPlay(2) actually going to frame 1 and looping from there? Has something changed in AS3?
Thanks!
GotoAndPlay With Variables...not Working
hey im trying to make a character selection in a game and what i want to do is whenever you press right it goes up a frame and whenever you press left it goes back one. here is the code i have so far for the movie clip..
Code:
onClipEvent(enterFrame) {
for (i=2; i<26; i++) {
if (Key.isDown(Key.RIGHT)) {
this.gotoAndPlay(i);
}
}
for (j=1; j<26; j--) {
if (Key.isDown(Key.LEFT)) {
this.gotoAndPlay(j);
}
}
}
inside the movie clip there are 25 frames all with stop functions, the frames represent different characters.
Any help would be greatly appreciated
Thanks,
TVWeb
Movieclip.gotoAndPlay() Isn't Working
Hiya, I'm hoping someone can help me, as I am unable to see a problem in my coding.
It's a simple command, creating a load bar for a child swf loaded into a movieclip within a parent swf. The load bar works fine, but when the swf is fully loaded i want to tell it to go to and play a specific frame. I am using the code mov_site.gotoAndPlay("start") whereby mov_site is the empty movie clip and start is the frame I want it to play.
However, for some peculiar reason it's going to the frame label "start" but is acting as if there's a stop command on this frame label...it simply won't play any more of the loaded movie. I can definitely say that there quite clearly isn't a stop command on this frame, i have used this coding before without issue, and the issue is now really starting to bug me...something so simple that I can't see an issue with. If i remove the line mov_site.gotoAndPlay("start"); then it loads the movie fine and it simply plays from the beginning.
My code for the load bar is below...can anyone help?
Thanks very much!
stop();
mov_site.loadMovie("cliffhousecontent.swf");
img_mask.onEnterFrame = function() {
var l = mov_site.getBytesLoaded();
var t = mov_site.getBytesTotal();
var percent = Math.round(l/t*100);
img_mask._y = 450-(percent*3);
if (l==t){
mov_site.gotoAndPlay("start");
}
Checklog - GotoAndPlay Not Working
I hope this is the correct area to post. I tried to create a delay before loadVariablesNum and the attached fla will not work. I want a delay "Loading..."
Then if the Checklog = 12 the login form loads again. I can't get it to work. It's driving me crazy!!!
Please help
Here is the code....
Frame 6
stop();
Selection.setFocus(userinput);
this.onEnterFrame = function () {
if(_root.checklog == 11){
gotoAndPlay('reg');
}
if(_root.checklog == 12)
{
_root.gotoAndPlay('form');
_root.status = "User Name & Password Not Found";
Selection.setFocus(userinput);
}
}
Frame 6 Button
on (release) {
if (_root.user.isWhiteSpace() | _root.user.length == 0 | _root.user == "" | _root.user eq "") {
Selection.setFocus(userinput);
_root.status = "No User Name Entered";
}
else if (_root.pass.isWhiteSpace() | _root.pass.length == 0 | _root.pass == "" | _root.pass eq "") {
status = "No Password Entered";
Selection.setFocus(passinput);
}
else {gotoAndPlay('search1'); //Frame 8
}
Frame 8
pauseFor(4000)
Frame 9
{
loadVariablesNum("newlogin1.php", 0, "POST");
}
Newbie: GotoAndPlay Not Working...please Help
Hi. I am new to flash and am stumped on one (simple) thing. I have an animation that plays and then stops. From there I have a movie clip on the timeline that I want to start playing at frame (2).
The problem is, its not working. Its going to and stopping, not playing. Please, what am I doing wrong?
Thanks so much.
Here are the actions:
stop();
onClipEvent (EnterFrame)
{
this.boxes.gotoAndPlay(2):
}
Simple AS2 GotoAndPlay Is Not Working :T
hello,
A very newbie question. does anyone see anything wrong with the following code? I'm trying to make a MC move. Thanks.
PHP Code:
//10Rittenhouse
ritten.onRollOver = function(){
ritten.gotoAndPlay(2);
}
//kalahari
kalahari.onRollOver = function(){
kalahari.gotoAndPlay(2);
}
|