Hi,
a solution could be removeEventListener
Esempio:
Code:private function clickEaseIn(event:MouseEvent):void { inTween = new Tween(monitor_mc,"x",Elastic.easeOut,255,700,1,true); right_mc.removeEventListener(MouseEvent.CLICK, clickEaseIn); }
This is a discussion on [AS3.0]Tween Problem within the Actionscript 3.0 newbies forums, part of the Flash English category; Hello all! im learning how to make tweens in AS3.0... i made my tween function inside a Class, so i ...
Hello all! im learning how to make tweens in AS3.0... i made my tween function inside a Class, so i can practice tweens and classes.. anyway! i want after i click my button and movieclip makes the tween that button doesn't work again, button does not make the tween again if the movieclip is already in that X position.. ill post code here and the link with sources too.. thanks a lot guys...
http://www.ibrastudio.com/classwithtweeningPractice.rarCode:package { import fl.transitions.Tween; import fl.transitions.easing.*; import flash.display.MovieClip; import flash.events.MouseEvent; public class TweeningClass extends MovieClip { var inTween:Tween; var outTween:Tween; public function TweeningClass() { left_mc.buttonMode = true; right_mc.buttonMode = true; left_mc.addEventListener(MouseEvent.CLICK, clickEaseOut); right_mc.addEventListener(MouseEvent.CLICK, clickEaseIn); } private function clickEaseIn(event:MouseEvent):void { inTween = new Tween(monitor_mc,"x",Elastic.easeOut,255,700,1,true); } private function clickEaseOut(event:MouseEvent):void { outTween = new Tween(monitor_mc,"x",Elastic.easeOut,700,255,1,true); } } }
Hi,
a solution could be removeEventListener
Esempio:
Code:private function clickEaseIn(event:MouseEvent):void { inTween = new Tween(monitor_mc,"x",Elastic.easeOut,255,700,1,true); right_mc.removeEventListener(MouseEvent.CLICK, clickEaseIn); }
CSS.FlepStudio.org in english: css tutorials, free css template and css menu
Conversione da PSD a XHTML/CSS - Creazione siti web - Introduzione CSS3
im going to try that! ill let you know! thanks thanks a lot Onsitus...
Or just 'play' with:
left_mc.mouseEnabled=true;
and
left_mc. mouseEnabled =false;
Bookmarks