Screen Transition Manager
Sep 22nd 2013, 21:30
Handling the complex screen transition of flash game or other flash application are so boring and repetitive works, especially if developed without flash authoring tool. Then I wrote and share a small general library that handle this job, below is the preview and it can be extended as complex as you like.
The class usage is very simple, it just call a static method, one line only, new and old screen must derived from Sprite class. Don't forget to import the class :
import com.boontaran.transitions.TransManager;
Show Plain Text
- TransManager.change(this, oldScreen, newScreen,TransManager.MASK_SQUARES);
- //params :
- // 1st : parent of screens
- // 2nd : old screen (sprite) to remove
- // 3rd : new screen
- // 4th : transition effect, explore TransManager.as for the complete effect list
It written using OOP practice then you can easily alter the animation to fit your need. Tweening engine I used was "Tweener".