This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Flash Site Design > February 2004 > Stopping the animation on Screens





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Stopping the animation on Screens
zmfirstrain

2004-02-27, 5:28 pm

Hello,
I'm doing a Web site using screens (Flash 2004 Pro) where each slide has a
little animation which should play only when the screen is revealed.
Unfortunately, all the animations play although their corresponding screens are
not revealed, so when I click on the link to a screen, the animation has
half-played.
Now I did get to a point that I can use script like this to control it:
---------------------------------------------
_listener = new Object();

_listener.reveal = function(e){
_mc.play();
}
_listener.hide = function(e){
_mc.gotoAndStop(1);
}

_screen.addEventListener("reveal", _listener);
_screen.addEventListener("hide", _listener);
-----------------------------------------------------

Now my "_screen" are the corresponding names of screens, but what's my
"_listener"--I tried with "screen", "slide", "form", you name it, but don't
know what my eventListener is...
Can someone help?
Thanks in advance!


Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews