Some things works like a charm, some others don't...
Movement:
- Code: Select all
TweenLite.to(sprite, 5, {x:10, y:20});
Alpha:
- Code: Select all
TweenLite.to(sprite, 5, {alpha:0.5});
Scale:
- Code: Select all
Instead of :
TweenLite.to(sprite, 5, {scaleX:4, scaleY:4});
You have to write :
TweenLite.to(sprite.scale, 5, {x:4, y:4});
Rotation:
- Code: Select all
Instead of :
TweenLite.to(sprite, 5, {rotation:180});
You have to write :
TweenLite.to(sprite, 5, {angle:180});
Pause all Tweens (when you lose focus) :
Copy org/axgl/util/AxpauseState.as to make your new modified pause state.
In your new PauseFocus, import com.greensock.TweenMax (only TweenMax can pause everything, not TweenLite).
Then add :
- Code: Select all
override public function create():void {
(...)
TweenMax.pauseAll();
}
and
- Code: Select all
override public function dispose():void {
super.dispose();
TweenMax.resumeAll();
}
And to finish, replace the original pauseState by your new one in your main package :
- Code: Select all
import src.state.PauseFocus; // Import your modified pauseState
(...)
override public function create():void {
Ax.pauseState = PauseFocus;
}
Do anybody know how to make the pluggins work?
Thanks for your help.