PDA

View Full Version : Question about slide animation with AS3



mikes02
August 21st, 2009, 11:44 AM
http://whoisfermin.com/

I was looking at that site, I want to do something similar, however, I don't want a dragging slider, I just want to have buttons that when you click it, it slides the next screen into view.

For example, where the little icons appear of the Bear, Rhino, Wolves, etc. those would be where my buttons were, and when it is clicked it slides that particular panel into view, maybe with a bit of easing.

Was wondering how this would be possible, I am new to AS3 and am looking for any help I could get.

Thank you!

dmennenoh
August 21st, 2009, 12:17 PM
Google TweenLite... best tweening class there is, makes short work of things like this.

mikes02
August 22nd, 2009, 03:09 AM
How does it work with the buttons where you click and object slides in?

theRemix
August 22nd, 2009, 05:19 AM
set your buttons on stage then


myButton1.addEventListener(MouseEvent.CLICK, clicked_myButton1);

function clicked_myButton1(event:MouseEvent):void{
// tween your layer's .x property
}

i'm guessing you'll want to setup a parallax effect. so tween all layers with different distances.

here's a tutorial that may help you in using TweenLite to move things around, i wrote this recently to demonstrate how to make a simple slideshow.

http://remixtechnology.com/view/flash-actionscript3-tutorial-animated-slideshow

hth