Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0

Reply
 
Thread Tools Rate Thread Display Modes
Old 02-01-2008, 01:49 PM   #1
visuale
Registered User
 
Join Date: Jan 2008
Posts: 44
Default 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!
visuale is offline   Reply With Quote
Old 02-01-2008, 02:01 PM   #2
visuale
Registered User
 
Join Date: Jan 2008
Posts: 44
Default 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!
visuale is offline   Reply With Quote
Old 02-01-2008, 02:07 PM   #3
Mazoonist
Site Contributor
 
Mazoonist's Avatar
 
Join Date: Jun 2006
Posts: 3,160
Send a message via AIM to Mazoonist
Default

You must be doing something wrong, because those things do work in Flash CS3. I'm attaching a (very!) simple example. Hope it helps.
Attached Files
File Type: zip stop_command.zip (5.1 KB, 17788 views)
__________________
My Tutorials * My Website
Mazoonist is offline   Reply With Quote
Old 02-01-2008, 02:15 PM   #4
visuale
Registered User
 
Join Date: Jan 2008
Posts: 44
Default

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.
visuale is offline   Reply With Quote
Old 03-21-2008, 09:57 PM   #5
Rocketboy
Senior Member
 
Join Date: Apr 2006
Location: Brooklyn
Posts: 109
Default

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.
__________________
-jack
www.jackkalish.com
Rocketboy is offline   Reply With Quote
Old 03-21-2008, 10:23 PM   #6
jaga
Senior Member
 
Join Date: Nov 2007
Posts: 529
Default

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
jaga is offline   Reply With Quote
Old 03-24-2008, 06:34 PM   #7
Rocketboy
Senior Member
 
Join Date: Apr 2006
Location: Brooklyn
Posts: 109
Default

Oh, I guess I was thinking about scripts on buttons and movieclips. Those are no longer supported, right?
__________________
-jack
www.jackkalish.com
Rocketboy is offline   Reply With Quote
Old 08-12-2008, 09:22 PM   #8
wessidemd
Registered User
 
Join Date: Aug 2008
Posts: 2
Default

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....
wessidemd is offline   Reply With Quote
Old 09-04-2008, 06:37 PM   #9
robh2255
Registered User
 
Join Date: Sep 2008
Posts: 6
Default

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!
robh2255 is offline   Reply With Quote
Old 09-05-2008, 01:39 AM   #10
marspark
Member
 
Join Date: Dec 2006
Posts: 58
Default

Quote:
Originally Posted by robh2255 View Post
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
marspark is offline   Reply With Quote
Reply


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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Extremely easy script but won't work! Why? Jooma ActionScript 2.0 0 02-02-2006 12:15 PM
How to stop and play movieclips cayohueso ActionScript 2.0 8 07-22-2005 02:53 AM
Need help for stop button! jrk_productions ActionScript 2.0 1 12-07-2004 07:14 PM
script stops in a frame that has no stop(); flash_rocks ActionScript 2.0 0 01-09-2004 07:46 PM
Stop a loaded movie doesn't work! AVETAR ActionScript 1.0 (and below) 5 12-06-2002 02:09 AM


All times are GMT. The time now is 02:14 AM.

///
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.