Guest User

Untitled

a guest
Jul 20th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. private var _currentTargetPosition:LinkedListPoint;
  2.  
  3. private function createPositionTargets():void
  4. {
  5. var onPosition:LinkedListPoint = new LinkedListPoint(0, ON_STAGE_Y, null);
  6. var offPosition:LinkedListPoint = new LinkedListPoint(0, OFF_STAGE_Y, onPosition);
  7. onPosition.next = offPosition;
  8.  
  9. _currentTargetPosition = offPosition;
  10. }
  11.  
  12. private function togglePosition(e:MouseEvent):void
  13. {
  14. _currentTargetPosition = _currentTargetPosition.next;
  15. moveTo(_currentTargetPosition.y);
  16. }
  17.  
  18. private function moveTo(yPos:Number):void
  19. {
  20. TweenLite.to(this, 1, {y:yPos});
  21. }
Add Comment
Please, Sign In to add comment