02-01-2008, 01:49 PM
|
#1
|
|
Registered User
Join Date: Jan 2008
Posts: 44
|
stop(); doesn't work
Hey, I just got Flash CS3. I'm trying to get my main timeline to stop in the begining, on button press to play and at the end stop again. In AS2, you would just put stop(); on the first keyframe and stop(); on the last key frame and program your buttons accordingly. The stop(); does not work!!!! It's driving me crazy. What am I missing? I've gone through the tutorials in Flash and they don't work either. Help!
Also, if you have MovieClip that contains an animation and you don't want the movie clip to be on a continuous loop how do you stop it from playing. In AS2, I would put a stop(); on the last keyframe of the movieclip's animation. This also does not work in AS3. Any help would be great!
Thanks!
|
|
|
02-01-2008, 02:01 PM
|
#2
|
|
Registered User
Join Date: Jan 2008
Posts: 44
|
stop(); doesn't work in CS3 :(
Hey, I just got Flash CS3. I'm trying to get my main timeline to stop in the begining, on button press to play and at the end stop again. In AS2, you would just put stop(); on the first keyframe and stop(); on the last key frame and program your buttons accordingly. The stop(); does not work!!!! It's driving me crazy. What am I missing? I've gone through the tutorials in Flash and they don't work either. Help!
Also, if you have MovieClip that contains an animation and you don't want the movie clip to be on a continuous loop how do you stop it from playing. In AS2, I would put a stop(); on the last keyframe of the movieclip's animation. This also does not work in AS3. Any help would be great!
Thanks!
|
|
|
02-01-2008, 02:07 PM
|
#3
|
|
Site Contributor
Join Date: Jun 2006
Posts: 3,160
|
You must be doing something wrong, because those things do work in Flash CS3. I'm attaching a (very!) simple example. Hope it helps.
|
|
|
02-01-2008, 02:15 PM
|
#4
|
|
Registered User
Join Date: Jan 2008
Posts: 44
|
It doesn't work, it just flashes the text from frame 1 to 2. I'm going to unlnstall and reinstall. Something is not right. I am an AS2 pro and this stuff should work. Maybe I got a bunk copy of CS3! Thank for your help anyway.
|
|
|
03-21-2008, 09:57 PM
|
#5
|
|
Senior Member
Join Date: Apr 2006
Location: Brooklyn
Posts: 109
|
Err, as far as I know as3 does not support frame scripts, except for on the very first frame of the root timeline of you fla. So, you would have to do this dynamically by creating an onEnterFrame listener, and then checking to see if you are on the final frame, and stopping the animation if you are.
|
|
|
03-21-2008, 10:23 PM
|
#6
|
|
Senior Member
Join Date: Nov 2007
Posts: 529
|
That's not true Rocketboy, you can still put code in frames where ever you want. Its not the best practice, and will have errors with calling things correctly sometimes, but its completely legitimate
|
|
|
03-24-2008, 06:34 PM
|
#7
|
|
Senior Member
Join Date: Apr 2006
Location: Brooklyn
Posts: 109
|
Oh, I guess I was thinking about scripts on buttons and movieclips. Those are no longer supported, right?
|
|
|
08-12-2008, 09:22 PM
|
#8
|
|
Registered User
Join Date: Aug 2008
Posts: 2
|
Check to make sure that you didn't set that layer to invisible. Your code will NOT run if the layer is invisible.
Stupid, yes.
Useless, yes.
Annoying, yes.
Why does the visibility of the layer even matter? I don't know....
|
|
|
09-04-2008, 06:37 PM
|
#9
|
|
Registered User
Join Date: Sep 2008
Posts: 6
|
I'm having the same problem as visuale. The stop() won't work in frame 1 (or any other frame for that matter) except for the last frame. Keep in mind that this only occurs when I'm playing my movie within Flash (Control Menu > Play). If I choose the Test Movie option, it works. But I should be able to play this within Flash too. Furthermore, I copied the same code into a new AS2 file and it works fine. So something is wrong with AS3 or it requires additional code. I've tried everyone else's ideas as well, but nothing works. Any more ideas? Thanks in advance for any help!
|
|
|
09-05-2008, 01:39 AM
|
#10
|
|
Member
Join Date: Dec 2006
Posts: 58
|
Quote:
Originally Posted by robh2255
I'm having the same problem as visuale. The stop() won't work in frame 1 (or any other frame for that matter) except for the last frame. Keep in mind that this only occurs when I'm playing my movie within Flash (Control Menu > Play). If I choose the Test Movie option, it works. But I should be able to play this within Flash too. Furthermore, I copied the same code into a new AS2 file and it works fine. So something is wrong with AS3 or it requires additional code. I've tried everyone else's ideas as well, but nothing works. Any more ideas? Thanks in advance for any help!
|
I remember it's suppose to work that way
|
|
|
| Thread Tools |
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT. The time now is 01:15 PM.
///
|
|