Hello. Let's assume you have made an animation in Flash 8.
So it's like separated into Scenes. To edit the list of scenes, press Shift+F2. Or you can go to Insert->Scene.
Break down your long animation into scenes and write down all names of scenes in their order.
What you would like to do now is a menu which allows to:
1) start playing from a particular scene to the end of that scene;
2) start playing from the start of the movie to the end of the movie;
Now how to accomplish this.
1) Draw your menu. Make 1 button for each scene and 1 button for "Play all". Make your buttons Buttons, not MovieClips.
2) For each button, click it, go to Properties Inspector (Ctrl+F3) and type "Scene1", "Scene2", etc. Remember all their names.
3) Make a new scene and drag it to make it the first one. It does not matter how you name it.
4) Put all your buttons and menu picture into the first frame of the first scene.
5) While still being on first frame of first scene, click nowhere (deselect everything).
6) Open Actions or press F9 or go to Windows->Actions.
7) In the big text window type code:
if(Scenes==undefined){
Scenes=["Scene 1","Scene 2","Rob Pardo Kills Warcraft","Newgrounds Rules"];
Buttons=["scene1","scene2","rob","newgrounds"];//do not include PlayAll in this list
PlayAll=playall;
//Scenes is a list of your scene names
//Buttons is a list of button names in menu
//Elements of Scenes and Buttons are, well, related, and are in same order
//PlayAll= name of your Play All button, because it is special
Frames=[];
snd=new Sound();
snd.setVolume(0);
for(i=0;i<Scenes.length;i++){
gotoAndStop(Scenes[i],1);
Frames[i]=_currentframe;
}
gotoAndStop(1);
stopAllSounds();
snd.setVolume(100);
Mode=null;
onMouseDown=function(){
if(PlayAll.hitTest(_xmouse,_ymouse,true)){
Mode="all";
gotoAndPlay(Frames[0]);
stopAllSounds();
}
for(i=0;i<Buttons.length;i++)if(Buttons[i].hitTest(_xmouse,_
ymouse,true)){
Mode=i;
gotoAndPlay(Frames[i]);
stopAllSounds();
}
}
onEnterFrame=function(){
if(Mode==null)return;
for(i=0;i<Frames.length;i++)if(_currentframe==Frames[i])stop AllSounds();
if(Mode=="all" && _currentframe==1 || !isNaN(Mode) && _currentframe==Frames[Mode+1]){
Mode=null;
gotoAndStop(1);
stopAllSounds();
}
}
}
What will this code do? When you press a button, the code will play movie from the selected scene to the end of that scene. If you press PlayAll button, entire movie will be played. After playing is finished, you return to the menu.
When a scene finishes, all sounds and music are interrupted/stopped, even if it's currently playing all the scenes. So each scene starts in absolute silence.
What do you think about this?