Guest User

Untitled

a guest
Jan 21st, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. pTarget.completeEventHandler = function(e:Event) : void
  2. {
  3. // hide the loader
  4. if(mcLoader != null) mcLoader.visible = false;
  5.  
  6. // first remove the old bitamp if it was
  7. if(pTarget.content != null && pTarget.contains(pTarget.content)) pTarget.removeChild(pTarget.content);
  8.  
  9. // add the content and retain it to control its timeline if is a swf
  10. pTarget.content = pTarget.addChild(pTarget.loader);
  11.  
  12. // show the new loaded content holder with tween if is the case
  13. if(showFlag)
  14. {
  15. pTarget.alpha = 0;
  16. pTarget.showObject();
  17. }
  18.  
  19. // call the complete listener of the target
  20. if(onCompleteFunction != null)
  21. {
  22. if(onCompleteFunction.length) onCompleteFunction(pTarget);
  23. else onCompleteFunction();
  24. }
  25. };
Add Comment
Please, Sign In to add comment