Basic stop(); actionscript not working
Copy link to clipboard
Copied
Hi I've just started using Flash CS4 and have encountered a problem, that I'm hoping someone can help me with.
If I create a new Flash 3.0 animation I can use the "stop();" ActionScript command to stop the animation. However if I save the file the "stop();" ActionScript ceases to work.
I can't think of anything that could be causing the problem. I’ve updated both Flash and Flash Player and the problem persists.
Am I using the wrong script?

Copy link to clipboard
Copied
if its a frame animation you got to make sure that the stop(); function is on the last frame of the animation.
if its an actionscript tween animation you need to create a tweenEvent to stop when the animation is finished.
if its none of the above please send the code and a brief on how the animation is set up and we will do our best to help...
Copy link to clipboard
Copied
I have tried a few basic animation with the intent of making a small game at the end. All the actionscript has been on the frame.
The most simple animation I have made is this:
-Start new flash animation, actionscript 3.0
-Red rectangle on frame 1
-Blue circle on frame 2
-Ctrl+Enter to preview. Animation flickers between red rectangle and blue circle.
-Select frame 1, press F9 to open actionscript window. Type "stop();". Close window
-Ctrl+Enter to preview. Animation displays a red rectangle and never progresses
-Save As. Call the file stoptest.fla
-Ctrl+Enter to preview. Animation flickers between red rectangle and blue circle.

Copy link to clipboard
Copied
Please attach FLA file.
But before you do that try to put the stop(); on a different layer.
Create a layer for actionscript only and put the stop(); on a blank keyframe...
Copy link to clipboard
Copied
Flash attatched. Some small changes to description above to prevent it flickering so quickly
edit: There was an error, I'm not sure where uploaded files appear but it may not have let me upload
Copy link to clipboard
Copied
Double post
Copy link to clipboard
Copied
Since it doesn't look like the upload worked, here are some screenshots

Copy link to clipboard
Copied
the same thing happens to me and i can't figure it out. I have also posted here:
Copy link to clipboard
Copied
What I discovered was CS4 does not play nice with networked drives. If your operating on a network try saving your work to the desktop
Cheers
Joe Huck

Copy link to clipboard
Copied
Joe;
I did notice what you said at work and I remember someone telling me there was a white paper where Adobe states Flash is not supported when used in network drives. go figure????
But much like you said, I have had this problem in my local drive.
I tried the following.
I started from the beginning.
I created a new AS 3 doc.
Created a similar animation like the attached one on my orig post. [simple square moving using classic tween]
I added the stop on frame 1 on a separate layer name 'actions'.
I previewed the animation [ctrl + enter]
Swf plays as it should [no looping] and stopped on frame 1
I now save the file to root of c:
Preview again [ctrl + enter]
Now animation loops
stop(); doesn't not work.
And I also observed that the swf loops when the fla you publish from is located in the root of any drive partition but [swf] does not loop if fla is located inside a folder on any partition. ???? [this did not work on a network drive at work though]
Can you reproduce this behavior?
Mark Lewis

