Flash actionscript Double-sided object that rotates after x amount of seconds
I've been googling my butt off and ha开发者_JAVA技巧ve been able to find bits and pieces (mainly how to rotate an object in Flash) but not the portion about maintaining images on both sides.
I would like to create a MC that has a picture on the front-side, and when rotated horizontally the front-side image will fade according to the transition and the back-side image will appear.
Can someone help or point me to a tutorial that can help me achieve this?
Thanks.
This tutorial on Easy Breezy 3D Card Flip Effect with Flash, AS3 and Our Good Buddy TimelineMax is what you need. They run through it simply and use Tweenlite which i recommend. You can easily add a delay to a tweenlite tween if you wish. Just check out there Tweenlite docs, and maybe do a find for "delay".
Here's the general procedure:
1) Create 2 movie clips: one for the "front" and one for the "back". They should be the same size and both have their registration point TOP-CENTER or CENTER-CENTER.
2) Hide the "back" and set its rotation on the Y axis to -90.
3) When the animation starts, tween the "front" on the Y axis from 0 to 90.
4) Hide the "front" and show the "back".
5) Tween the "back" from -90 to 0 on the Y axis.
I wrote this recipe, StageFlip, a long time ago. A quick read makes me cringe a little since there are quite a few things I would change (including not using the Flash tween engine) but the lighting adjustment during the animation does add realism (see the .swf file).
精彩评论