flash help!!!

Out of context: Reply #34

  • Started
  • Last post
  • 36 Responses
  • honda0

    you can not simply load a movie and go to its frame. you must first:
    createEmptyMovieClip that will be a point of reference and also allow you to control loaded _mc.

    then you must determine what has been loaded into _mc before you can begin jumping around frames. code below:

    //name of new host for loaded _mc
    createEmptyMovieClip("navigation... 1);
    //set placement of _mc
    navigation._x = 0;
    navigation._y = 0;
    //load your .swf into the newly created _mc
    loadMovie("nav.swf", navigation);
    //_mc preloader
    //essentially, wait til _mc is loaded...
    //...delete this event...
    //...and go to specified frame.
    this.onEnterFrame = function(){
    var l = navigation.getBytesLoaded();
    var t = navigation.getBytesTotal();
    if(l == t){
    if(navigation._width > 1){
    navigation.gotoAndPlay(2);
    delete this.onEnterFrame;
    }
    }
    };
    //play _mc
    /*
    you are now able to control "nav.swf" through the _mc "navigation"
    if you want to go to any area in the nav.swf timeline
    simply type: navigation.gotoAndPlay("yourFram...
    */
    navigation.gotoAndPlay(2);

View thread