Writing an effect for a transition
245
// Check whether angleTo is set.
if (isNaN(angleTo))
{
// If not, look in propertyChanges.end for a value.
// Otherwise, set it to 360.
angleTo = (propertyChanges.end["rotation"] != undefined) ?
propertyChanges.end["rotation"] : 360;
}
// Create a Tween object. The tween begins playing immediately.
var tween:Tween =
createTween(this, angleFrom, angleTo, duration);
}
// Override onTweenUpdate() method.
override public function onTweenUpdate(val:Object):void {
target.rotation = val;
}
// Override onTweenEnd() method.
override public function onTweenEnd(val:Object):void {
// All classes that implement onTweenEnd()
// must call super.onTweenEnd().
super.onTweenEnd(val);
}
}
}
Содержание FLEX 2 - CREATING AND EXTENDING COMPONENTS
Страница 1: ...Creating and Extending Flex 2 Components Adobe Flex 2...
Страница 6: ...6 Contents...
Страница 10: ...10 About Flex Documentation...
Страница 12: ......
Страница 24: ...24 Creating Flex Components...
Страница 74: ...74 Compiling Components...
Страница 76: ......
Страница 118: ...118 Creating Advanced MXML Components...
Страница 120: ......
Страница 182: ...182 Creating Advanced Visual Components in ActionScript...
Страница 194: ...194 Creating Custom Style Properties...
Страница 204: ...204 Creating Template Components...
Страница 206: ......
Страница 216: ...216 Creating Custom Formatters...
Страница 254: ...254 Index...