Posts Tagged Tween Classes
I was reading the book ActionScript 3 cookbook from O’Reilly (very good book by the way) and I wanted to get my hands dirty. I have never coded in ActionScript 3 before and where i work we still use Flash 8 because it’s what most people have. So there I was wanting to do basic stuff, regular animation using the tween classes from Flash, but at first I couldn’t find them. Searched a bit and found all sort of post saying they didn’t exist anymore, or that you had to use classes from Flex in order to use them. I finally found them after some time. So let me spare you that effort. Here are the tweening classes from flash CS3.
import fl.transitions.Tween; import fl.transitions.easing.*;
and they still work the same way using this syntax:
var myTween:Tween = new Tween(myObject, "x", Elastic.easeOut, 0, 300, 3, true);
The only difference is with the “x” where it used to be “_x” because ActionScript 3 dropped the underscore before key properties.