Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Basic stop(); actionscript not working

New Here ,
Aug 23, 2009 Aug 23, 2009

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?

TOPICS
ActionScript
9.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 23, 2009 Aug 23, 2009

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 24, 2009 Aug 24, 2009

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 24, 2009 Aug 24, 2009

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 24, 2009 Aug 24, 2009

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 24, 2009 Aug 24, 2009

Double post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 24, 2009 Aug 24, 2009

Since it doesn't look like the upload worked, here are some screenshots

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 17, 2009 Oct 17, 2009

the same thing happens to me and i can't figure it out. I have also posted here:

http://www.actionscript.org/forums/showthread.php3?t=220267

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 17, 2009 Oct 17, 2009

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 17, 2009 Oct 17, 2009
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines