0

HI,

I want to implement tweener effects in my application, but I have a rectangle,

shape = new Shape();
shape.graphics.beginFill(0xF9F9F9); 
shape.graphics.drawRect(200,80,700,450);
shape.graphics.endFill();
account_label.label ="Accounts";
account_label.setPosition(200,530);
account_label.width =140;
personal_details_label.label ="Personal Details";
personal_details_label.setPosition(340,530);
personal_details_label.width=180;

the above code shows my rectangle and two buttons,

Intially Accounts Form was selected by default, when i click PersonalDetails button i have to show the screen change effect (From Right to Left that means Personal DetailsForm is moving from right to left ) within that rectangle. Is this possible ?

George Profenza
  • 50,687
  • 19
  • 144
  • 218
ramsbh
  • 656
  • 4
  • 14
  • 26

1 Answers1

0

I'm a fan of tweensy, but you can do this with most tweening engines easily

Tweensy.to(shape, {x:-100}, 2.0);
 Tweensy.onComplete = animationComplete; //optional

The important part to consider when working with animations is timing. Either disable buttons or setup a proper fallbacks. The animations can take a few seconds and if the user can restart the animation, or if objects aren't cleared or initialized properly you can run into some issues.

Daniel
  • 34,125
  • 17
  • 102
  • 150