flash movie control?
- Started
- Last post
- 11 Responses
- redant
Hey does anyone know of any resources on controlling an swf? We have a 4 minute presentation and need to add a control bar to it. The movie has lots of movie clips and layers. Any help is greatly appreciated! Thanks. -J
- fate0
you control it just like an mc...
_root.MCthatholdstheSWF.dosometh...
- redant0
we are trying to play /pause stop f/ff sound and graphics. The sound stops but the animation continues to play even when the swf is placed in a holder mc.
- JazX0
I have what you are looking for.
- fate0
It keeps playing even if you used _root.MCtocontainSWF.animationMC... ?
- JazX0
Make on layer and put this script: var pauseFlag;
//pauseFlag = 0;
play();
function pauseMe() {
trace(pauseFlag);
if (pauseFlag == 1) {
gotoAndStop(_currentframe);
pauseFlag = 0;
} else {
if (pauseFlag == 0) {
gotoAndPlay(_currentframe);
pauseFlag = 1;
}
}
}
- JazX0
now reference that script on your pause\play button:
Put this on them: on(keyPress ""){
if(pauseFlag == null){
pauseFlag = 1;
};
pauseMe();}
on(press){
if(pauseFlag == null){
pauseFlag = 1;
};
pauseMe();
}
- redant0
well we used stop all clips to stop and then play all clips. It doesn't play from where it stopped?
- JazX0
tell me exactly what you want to do?
- redant0
i think your code will work fine. Umm we are basically making a presentation w/voice-over and putting it on cd. WE have made the presentation w/voice-over. Now we were wanting the user to be able to control the movie ie. stop/pause/play/f/ff/r. My co-worker is actually working on this, but we have to have it done this afternoon. tx
- JazX0
If you are looking to go from one scene to the next, if you have developed it this way in one module. Also use:
on (keyPress "") {
prevScene();
}
on (release) {
prevScene();
}AND
on (keyPress "") {
nextScene();
}
on (release) {
nextScene();
}