SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict djh's Avatar
    Join Date
    Apr 2000
    Location
    Long Beach, CA
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Control main timeline from a movieClip

    I'm trying to control when the main timeline advances from a mc on a layer, but it doesn't seem to work.

    First, I'm loading an external SWF into the mc on the layer. Then, when the external SWF is loaded, I'm trying to advance the main timeline.

    Code:
    bkgpicblur.loadMovie("m"+_root.nRnd+"_blur.swf",0);
    bkgpicblur.onEnterFrame = function() {
      tBytes = this.getBytesTotal();
      lBytes = this.getBytesLoaded();
      rBytes = tBytes-lBytes;
      pDone = int((lBytes/tBytes)*100);
      if (pDone >= 100) {
    //  gotoAndPlay(3);
    //  _level0.gotoAndPlay(3);
    // make the main timeline play frame 3!!!
      }
      else {
      gotoAndPlay(2);
      }
    }
    Help??

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are some issues with loading swfs into movie clips and the loaded movie wipes out any event handlers set in place for the clip the movie is loading into. You should however be able to check the status of the loading from the clip below.
    PHP Code:
    bkgpicblur.loadMovie("m"+_root.nRnd+"_blur.swf",0);
    this.onEnterFrame = function() {
      
    tBytes bkgpicblur.getBytesTotal();
      
    lBytes bkgpicblur.getBytesLoaded();
      
    rBytes tBytes-lBytes;
      
    pDone int((lBytes/tBytes)*100);
      if (
    pDone >= 100) {
       
    this.gotoAndPlay(3);
       
    _level0.gotoAndPlay(3);
       
    delete this.onEnterFrame;
      }



Bookmarks

Posting Permissions

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