hi everyone.
got this problem in actionscript programming, in anybody can help:
I have 7 movieClips named r9 to r15: any of them has an animation inside of 60 frames, stopped at frame 1.
i have to play them with actionscript like this:
function moveClips () {
for (i=9;i<=15;i++){
this["r"+i].gotoAndPlay(5)
}
}
well, when i call the function the movieClips go ti frame 5 and stop...
tried also:
function moveClips () {
for (i=9;i<=15;i++){
if (this["r"+i]._framesloaded >= this["r"+i]._totalframes) {
this["r"+i].gotoAndPlay(5)
}
}
}
but still no results...
where's the issue?
many thanks!
gotoAndPlay stops instead playing...
Page 1 of 110 Replies - 5623 Views - Last Post: 02 September 2012 - 12:20 PM
Replies To: gotoAndPlay stops instead playing...
#2
Re: gotoAndPlay stops instead playing...
Posted 18 August 2009 - 08:42 AM
Does it go to the correct mc or not? Or is it going to the current mc and stopping?
--
Greg
--
Greg
#3
Re: gotoAndPlay stops instead playing...
Posted 18 August 2009 - 01:00 PM
gregwhitworth, on 18 Aug, 2009 - 07:42 AM, said:
Does it go to the correct mc or not? Or is it going to the current mc and stopping?
--
Greg
--
Greg
hi greg,
the mc is correct: in fact if I give a different instruction, like _alpha property, it works as well for any of the mentioned clips.
simply, gotoAndPlay doesn't work...
#4
Re: gotoAndPlay stops instead playing...
Posted 18 August 2009 - 09:49 PM
Depending on the way you are attemping to accomplish this you may be causing a problem as you are trying to fix it. I believe your code it sound so I will look into the movieclip structure.
I am assuming that you only have one layer, or your layer with content and an animation on it also has the actionscript stop() on it. That will cause it problems especially if that keyfrme is more than one frame long. My suggestion is the make a new layer, name it actions, place a 1 frame long keyframe as the first frame (and delete the rest of the frames) and in that one place the stop() code. That should have it only going through the stop on the first frame instead of each frame it plays.
NOTE - I haven't tested this out to make sure it works, but I would expect it to be something simple like this.
Hope that helps.
I am assuming that you only have one layer, or your layer with content and an animation on it also has the actionscript stop() on it. That will cause it problems especially if that keyfrme is more than one frame long. My suggestion is the make a new layer, name it actions, place a 1 frame long keyframe as the first frame (and delete the rest of the frames) and in that one place the stop() code. That should have it only going through the stop on the first frame instead of each frame it plays.
NOTE - I haven't tested this out to make sure it works, but I would expect it to be something simple like this.
Hope that helps.
#5
Re: gotoAndPlay stops instead playing...
Posted 19 August 2009 - 12:41 AM
BetaWar, on 18 Aug, 2009 - 08:49 PM, said:
Depending on the way you are attemping to accomplish this you may be causing a problem as you are trying to fix it. I believe your code it sound so I will look into the movieclip structure.
I am assuming that you only have one layer, or your layer with content and an animation on it also has the actionscript stop() on it. That will cause it problems especially if that keyfrme is more than one frame long. My suggestion is the make a new layer, name it actions, place a 1 frame long keyframe as the first frame (and delete the rest of the frames) and in that one place the stop() code. That should have it only going through the stop on the first frame instead of each frame it plays.
NOTE - I haven't tested this out to make sure it works, but I would expect it to be something simple like this.
Hope that helps.
I am assuming that you only have one layer, or your layer with content and an animation on it also has the actionscript stop() on it. That will cause it problems especially if that keyfrme is more than one frame long. My suggestion is the make a new layer, name it actions, place a 1 frame long keyframe as the first frame (and delete the rest of the frames) and in that one place the stop() code. That should have it only going through the stop on the first frame instead of each frame it plays.
NOTE - I haven't tested this out to make sure it works, but I would expect it to be something simple like this.
Hope that helps.
Hi BetaWar,
I tryed your way, put any of mc on its layer, and inside mc i put stop an actions layer with the stop() on first keyframe, but nothing different happens.
Now, the solution I found is to put a play() action on keyframe 2 inside mc, give the mc.gotoAndPlay(2), and so it works... but I've never had to do something like that before, so, is it a flash bug?
And more: if i put the stop() in frame 2 of mc, and the playing instruction is mc.gotoAndPlay(3), it works! So, is the damned frame 1?
This post has been edited by nicchiet: 19 August 2009 - 12:48 AM
#6
Re: gotoAndPlay stops instead playing...
Posted 19 August 2009 - 12:48 AM
No, maybe you´ve (mistakenly) had the stop code layer longer than one frame and when you put the play code there, it just overwritten it.
That´s the only thing I can think of - I am sure it is not a Flash bug.
That´s the only thing I can think of - I am sure it is not a Flash bug.
#7
Re: gotoAndPlay stops instead playing...
Posted 19 August 2009 - 01:21 AM
Aurel300, on 18 Aug, 2009 - 11:48 PM, said:
No, maybe you´ve (mistakenly) had the stop code layer longer than one frame and when you put the play code there, it just overwritten it.
That´s the only thing I can think of - I am sure it is not a Flash bug.
That´s the only thing I can think of - I am sure it is not a Flash bug.
maybe...
ok , try this: create a new file, create a mc with a 30 frames animation on a layer and an actions layer of 1 frame only with stop instruction. now go to root and put on frame 1 the mc just created, name it "mc1". create another actions layer in root and put the code: mc1.gotoAndPlay(2).
Mine is not working.
and yours? (possibly this try can tell us if my flash has bugs or not)
#8
Re: gotoAndPlay stops instead playing...
Posted 19 August 2009 - 01:58 AM
nicchiet, on 19 Aug, 2009 - 12:21 AM, said:
Aurel300, on 18 Aug, 2009 - 11:48 PM, said:
No, maybe you´ve (mistakenly) had the stop code layer longer than one frame and when you put the play code there, it just overwritten it.
That´s the only thing I can think of - I am sure it is not a Flash bug.
That´s the only thing I can think of - I am sure it is not a Flash bug.
maybe...
ok , try this: create a new file, create a mc with a 30 frames animation on a layer and an actions layer of 1 frame only with stop instruction. now go to root and put on frame 1 the mc just created, name it "mc1". create another actions layer in root and put the code: mc1.gotoAndPlay(2).
Mine is not working.
and yours? (possibly this try can tell us if my flash has bugs or not)
listen what... changing the publish settings to AS3 all is working. doesn't sound a great solution.. it is definitly a bug
#9
Re: gotoAndPlay stops instead playing...
Posted 31 August 2009 - 10:15 AM
i dont know if this help but just share my little experience to you
before i tried using the gotoAndPlay in flash CS4
actually im just doing little testing
i've create a movieclip of 15 frames
at frame 15 i added
gotoAndPlay(14)
into it and actually it got bugged....
it DOESNT PLAY, working like "gotoAndStop(14)"
im sure there is nothing other than gotoAndPlay i've added
so i try another way
adding gotoAndStop(14) at frame15 and play() at frame 14
testing it again, it give me strange result "the action script in this file will probably slow down your computer....."
this usually only appear for actionscript contain some looping like
gotoAndPlay(14) at frame 15 ,gotoAndPlay(15) at frame 14
how does
adding gotoAndStop(14) at frame15 and play() at frame 14
cause my computer to slow down...
the most ridiculous thing is that all these are sloved by
adding 1 frame between it like this
gotoAndPlay(13) at frame 15
then all things go extremely smoothly, nothing got halted...
how comes gotoAndPlay(13) is working but gotoAndPlay(14) does not even work
so i think the goto function is really bugged... or if i've done something wrong?? please point out my mistake to help me improve
before i tried using the gotoAndPlay in flash CS4
actually im just doing little testing
i've create a movieclip of 15 frames
at frame 15 i added
gotoAndPlay(14)
into it and actually it got bugged....
it DOESNT PLAY, working like "gotoAndStop(14)"
im sure there is nothing other than gotoAndPlay i've added
so i try another way
adding gotoAndStop(14) at frame15 and play() at frame 14
testing it again, it give me strange result "the action script in this file will probably slow down your computer....."
this usually only appear for actionscript contain some looping like
gotoAndPlay(14) at frame 15 ,gotoAndPlay(15) at frame 14
how does
adding gotoAndStop(14) at frame15 and play() at frame 14
cause my computer to slow down...
the most ridiculous thing is that all these are sloved by
adding 1 frame between it like this
gotoAndPlay(13) at frame 15
then all things go extremely smoothly, nothing got halted...
how comes gotoAndPlay(13) is working but gotoAndPlay(14) does not even work
so i think the goto function is really bugged... or if i've done something wrong?? please point out my mistake to help me improve
#10
Re: gotoAndPlay stops instead playing...
Posted 01 September 2012 - 05:29 PM
I ran into the same problem. In my class I call
The solution was to put
myMovie_mc.gotoAndPlay(1);. The movie stops.
The solution was to put
play();on the first frame of the timeline. Now it works
#11
Re: gotoAndPlay stops instead playing...
Posted 02 September 2012 - 12:20 PM
Okay the problem seems to be related to actionscript on the timeline and actionscript in my class.
If I have
If I remove the actionscript from the timeline and only control it from my class, it works fine and plays.
Oops...
should read:
If I have
stop();on the last frame of my timeline and call
myMovie_mc.gotoAndStop(myMovie._totalframes);then I lose control over the movieclip. If I call "gotoAndPlay()" after that from my class it will go to the frame and stop.
If I remove the actionscript from the timeline and only control it from my class, it works fine and plays.
Oops...
joeshmmoe, on 02 September 2012 - 12:18 PM, said:
myMovie_mc.gotoAndStop(myMovie._totalframes);
should read:
myMovie_mc.gotoAndStop(myMovie_mc._totalframes);
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote





|