Welcome to WebmasterWorld Guest from 54.167.29.212

Forum Moderators: open

Message Too Old, No Replies

stop () TAG

stop () TAG

     

mavi

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

5+ Year Member



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

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

WebmasterWorld Senior Member demaestro is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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

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

5+ Year Member



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

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

WebmasterWorld Senior Member demaestro is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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

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

5+ Year Member



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

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

WebmasterWorld Senior Member demaestro is a WebmasterWorld Top Contributor of All Time 10+ Year Member



maybe look into coding a click event rather then onRelease
 

Featured Threads

Hot Threads This Week

Hot Threads This Month