/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
import flash.ui.Mouse; import com.greensock.*; var Clicking:uint=0; var tab_x = tab.x; b1.addEventListener(MouseEvent.CLICK, left); function left(evet:MouseEvent):void{ if (Clicking<3) { Clicking++; trace(Clicking); } TweenLite.to(tab, 1, {x:tab_x + (Clicking * 65)}); } b2.addEventListener(MouseEvent.CLICK, right); function right(evet:MouseEvent):void{ if (Clicking>0) { Clicking--; trace(Clicking); } TweenLite.to(tab, 1, {x:tab_x + (Clicking * 65)}); }