Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // create onEnterFrame function to fade-in the root element (if UI Element is shown up)
- function cry_onShow()
- {
- _root._alpha = 0;
- onEnterFrame = function()
- {
- if (_root._alpha < 100)
- {
- _root._alpha++;
- }
- else
- {
- // clear onEnterFrame function
- onEnterFrame = function() {};
- }
- }
- }
- // create onEnterFrame function to fade-out the root element (if requested by UI System)
- function cry_requestHide()
- {
- onEnterFrame = function()
- {
- if (_root._alpha > 0)
- {
- _root._alpha--;
- }
- else
- {
- // clear onEnterFrame function and notify UI-System that this element does not need to be drawn anymore.
- onEnterFrame = function() {};
- fscommand("cry_hideElement");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement