Groups | Blog | Home
all groups > flash actionscript > september 2006 >

flash actionscript : Can you Tween custom properties?


David Stiller
9/5/2006 3:12:23 PM
stratosnatcher,

[quoted text, click to view]

Using the Tween class, you mean?

[quoted text, click to view]

Seems like it works.

import mx.transitions.Tween;
import mx.transitions.easing.*;
mc.custom = 0;
var tw:Tween = new Tween(mc, "custom", Strong.easeInOut, 0, 100, 12);
tw.onMotionChanged = function() {
trace(mc.custom);
};

In my Output panel, that custom property, MovieClip.custom, updates as
expected.


David Stiller
Adobe Community Expert
Dev blog, http://www.quip.net/blog/
"Luck is the residue of good design."

stratosnatcher
9/5/2006 6:36:42 PM
Can you directly tween some property other than "_x", "_y"...physical on-screen
built-in properties?

Or would I pretty much have to do some trickery with event listeners and do
some calculations based on one tween to make another tween (with easing) of
some other numeric property I'm tracking?
AddThis Social Bookmark Button