dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: preloader problem

  1. #1
    Creative Addiction
    Join Date
    Nov 2001
    Location
    Newyork
    Posts
    91

    preloader problem

    i have a swf with a preloader that loads the main movie into an empty clip called " container". i want to use this preloader to load all the swfs in my main movie in another clip called holder . main movie loads fine but when i try to call the preloader from the main movie it does not work here is code am using please help me . i am sure its not rocket science for you flash gurus out there

    var container = this.createEmptyMovieClip("container", 1);
    var holder = this.createEmptyMovieClip("holder",2);
    var myMCL:MovieClipLoader = new MovieClipLoader();
    var myListener:Object = new Object();
    myMCL.addListener(myListener);
    myListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
    var loaded:Number = Math.round((bytesLoaded/bytesTotal)*100);
    var loadraw:Number = Math.abs((bytesLoaded/bytesTotal)*100);
    loaderMC.loader.bar.gotoAndStop(loaded);
    loaderMC.loader.loadedtxt = loadraw+"%";
    };
    myListener.onLoadInit = function(target_mc:MovieClip) {
    loaderMC.loader.bar._visible = false;
    target_mc._visible = true;
    };
    myListener.onLoadStart = function(target_mc:MovieClip) {
    loaderMC.loader.bar._visible = true;
    target_mc._visible = false;
    };

    myMCL.loadClip("pan2.4.swf",container);


    how would i call myMCL from my main loaded movie to load another swf in the main loaded movie

  2. #2
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    hi,

    From the main timeline of the external .swf, it should be _parent.myMCL, as the main timeline of the external movie, once loaded, becomes container.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center