homepage Welcome to WebmasterWorld Guest from 54.242.231.109
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

    
stop () TAG
stop () TAG
mavi




msg:3528100
 8:33 pm on Dec 14, 2007 (gmt 0)

Hi everybody.... I am having a problem with the stop TAG and hope u guys can help me with it.

I usually don't use actionscript that much.
So my scripin is pretty poor.
I am using flash7

Well...
I have a animations and a button to go to the next or previous animation.
Then I tried to add a stop button, but the stop command only works if the button is a symbol in the same layer as the animation itsself.

What I need is a stop comand that stops all layers ( underlying layers ) and the same thing for play.

Thanx if anybody can help me with this.
Regards
Martin

 

Demaestro




msg:3528116
 9:13 pm on Dec 14, 2007 (gmt 0)

Assuming all your animations are of type movie clip and all have an instance name.

I would try stopping each instance explicitly.

animation_name_mc.stop();

I am not sure though I am using Flash 9.0 and actionscript 3.0 and I am not familiar with earlier versions.

mavi




msg:3528377
 7:16 am on Dec 15, 2007 (gmt 0)

Thanx....

I think that could work.
Right now I just have a a stop(); ( without the name before the layer )

The animation name before the DOT is also the layer name right.
If I solve the problem like this, I would have to change all the animation names which will takem me around 2 day...

Do you know if there is also a "ALL LAYERS" command or something like that?

( something like GLOBAL STOP for all underlying and overlying layers )

I have use imported fireworks animation.
SO when I import then, flash7 converts them to ediatble flash elements.

Thanx
Martin

Demaestro




msg:3529510
 3:20 pm on Dec 17, 2007 (gmt 0)

I don't think actionscript is layer sensitive. Just object classes with instance names. When you put it into a frame of a layer that just defines when it gets run not what it executes global commands against.

Just be explicit, name everything, and call the functions on the objects directly.

mavi




msg:3530595
 8:28 pm on Dec 18, 2007 (gmt 0)

HI again

Thanx for your answer.
It works now... well ... almost...

Now the problem is that I can only use the stop and the play button once.

When I press stop the movie stops.
Then I press play and it plays.
But if i want to stop the movie again, the stop button doesn't react again...

Do you have an idea why this happens...
Would be great if you could help me again.

This is what I did... ( 2 frames )
-------------------------------------
STOP BUTTON First frame
-------------------------------------
on (release) {
_root.video1.stop();
_root.video2.stop();
_root.video6.stop();
nextFrame();

---------------------------------------
PLAY BUTTON Second Frame
---------------------------------------
on (release) {
_root.video1.play();
_root.video2.play();
_root.video6.play();
prevFrame();
----------------------------------------

Thanx and regards
MAVI

Demaestro




msg:3530706
 10:49 pm on Dec 18, 2007 (gmt 0)

maybe look into coding a click event rather then onRelease

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved