Skip to main content
Inspiring
June 3, 2008
Question

5-state-anvanced button is too slow

  • June 3, 2008
  • 1 reply
  • 323 views
5-state-anvanced button is too slow
by Pekka Varis on May 28, 2008 at 10:21:27 am


My AC3 made button is choppy:
http://www.catchline.fi/cow/version-04.html

normal button works fine and fast:
http://www.catchline.fi/cow/version-06.html


The 5-state button is made with this correct way:

------------------------------
AjaC.buttonMode = true;
AjaC.addEventListener(MouseEvent.ROLL_OVER,animIn1);
AjaC.addEventListener(MouseEvent.ROLL_OUT,animOut1);
function animIn1(event:MouseEvent):void {
AjaC.gotoAndPlay(2);
}
function animOut1(event:MouseEvent):void{
AjaC.gotoAndPlay(6);
}
------------------------------

If you think can help me, load the 2 fla (CS3) files from here:

http://www.catchline.fi/cow/slow.zip
http://www.catchline.fi/cow/working.zip

Pekka Varis

This topic has been closed for replies.

1 reply

robdillon
Participating Frequently
June 3, 2008
There is nothing really wrong with your code. Your complex button version is taking 6 frames to show the rollover effect. The normal button version only takes one frame. So your complex version is 6 times slower. If you want to use the complex version, you can speed it up by using fewer frames for the tween, or you can change the frame rate of the movie. Another option is to use an actionscript tween to animate instead of a timeline tween.