Posted By

n00ge on 11/10/07


Tagged

actionscript MovieClipLoader


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

ninedaysoff
dazza


MovieClipLoader


 / Published in: ActionScript
 

  1. ${1:thismc} = ${2:this}.createEmptyMovieClip("${3:loader_mc}", $2.getNextHighestDepth());
  2. $1._x = $4;
  3. $1._y = $5;
  4. var my_mcl:MovieClipLoader = new MovieClipLoader();
  5. var mclListener:Object = new Object();
  6. ${6:mclListener.onLoadStart = function(target_mc:MovieClip) {
  7. trace("loading movie");
  8. \}
  9. }${7:mclListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
  10. trace("loading movie progress " + Math.round(bytesLoaded/bytesTotal*100) + "%");
  11. \}
  12. }${8:mclListener.onLoadComplete = function(target_mc:MovieClip) {
  13. trace("loading complete");
  14. \}
  15. }mclListener.onLoadInit = function(target_mc:MovieClip) {
  16. ${9:trace("load init");}
  17. }
  18. mclListener.onLoadError = function(target_mc:MovieClip, errorCode:String) {
  19. ${10:trace("error loading movie: " + errorCode);}
  20. }
  21. my_mcl.addListener(mclListener);
  22. my_mcl.loadClip(${11:"$12.swf"}, $1);$0

Report this snippet  

You need to login to post a comment.