PDA

View Full Version : Tween in components


coxosclassic
10-25-2007, 04:58 PM
Hi all,

Im building my first component. Its a simple button with a Tween to change the alpha of the button.

But when i try to use this button, the tween doesn't occur (??)

Here is the code of in the component:

import mx.transitions.Tween;
import mx.transitions.easing.Strong;

myButton.onRelease = function()
{
new Tween(myButton, "_alpha", Strong.easeOut, 100, 0, 1, true);
}

tkx!,
cc
:cool:

wvxvw
10-25-2007, 07:29 PM
'myButton' is not visible from this scope, try changing it to 'this'.