// Specify how many frames to load before playing. var loadAmount = _totalframes; // If the required number of frames have finished loading... if (_framesloaded == loadAmount) { // ...start the movie gotoAndPlay("beginMovie"); } else { // ...otherwise, go back and check load progress again. gotoAndPlay("loading"); }