so whats the problem?
what is currently happening..or not happening?
why are you externally loading a .swf for this 'pause' screen?
why not just have a movieClip in the library that you attach when you hit the spacebar?
your way you need to load the .swf.. (which if you are using an .exe must mean the files are local? so maybe not a big deal) takes some time.. and then you need ot trigger or test for a way to know when the pause.swf is loaded.. and then at that point..start your 3 second time.
anyways.. I also suggest you NOT use loadMovie() any more..its old..and for AS2 using a movieClip Loader instance is the best way to go.. you get more control of executing other actions during different states of your loading of content..
anyways.. try this (not tested)
it loads your video.swf clip in..
when you hit space bar.. it will load your pause.swf in..
count 3 seconds..
remove the video.swf
remove the pause.swf
and jump to specified frame in the _root timeline..
actionscript Code:
//movieClip loader instance to load the video.swf
var videoLoader:MovieClipLoader = new MovieClipLoader();
var videoListener:Object = new Object();
videoListener.onLoadStart = function(target_mc:MovieClip):Void {
trace(">> videoListener.onLoadStart()");
}
videoListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
trace(">> videoListener.onLoadProgress()");
}
videoListener.onLoadComplete = function(target_mc:MovieClip, httpStatus:Number):Void {
trace(">> videoListener.onLoadComplete()");
};
videoListener.onLoadInit = function(target_mc:MovieClip):Void {
trace(">> videoListener.onLoadInit()");
};
videoLoader.addListener(videoListener);
// create an empty movieClip on the stage to hold our content...(this can be any target you want though)
var videoContainerClip:MovieClip = this.createEmptyMovieClip("videoContainerClip", this.getNextHighestDepth());
//load the video.swf/content
//videoLoader.loadClip("someVideo.swf", videoContainerClip);
//-----------------------------------------------------------------------------------//
//pauseClip loader instance to load the pause.swf
var pauseLoader:MovieClipLoader = new MovieClipLoader();
var pauseListener:Object = new Object();
pauseListener.onLoadStart = function(target_mc:MovieClip):Void {
trace(">> pauseListener.onLoadStart()");
}
pauseListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
trace(">> pauseListener.onLoadProgress()");
}
pauseListener.onLoadComplete = function(target_mc:MovieClip, httpStatus:Number):Void {
trace(">> pauseListener.onLoadComplete()");
};
pauseListener.onLoadInit = function(target_mc:MovieClip):Void {
trace(">> pauseListener.onLoadInit()");
//count 3 seconds then remove video, and jump to new frame
setTimeout(pauseTimer,3000);
};
pauseLoader.addListener(pauseListener);
// create an empty movieClip on the stage to hold our content...(this can be any target you want though)
var pauseContainerClip:MovieClip = this.createEmptyMovieClip("pauseContainerClip", this.getNextHighestDepth());
//-----------------------------------------------------------------------------------//
//listen for the spacebar to execute a function
var keyListener_obj:Object = new Object();
keyListener_obj.onKeyDown = function() {
switch (Key.getCode()) {
case Key.SPACE :
trace("SPACE BAR HIT");
//load the video.swf/content
pauseLoader.loadClip("pause.swf", pauseContainerClip);
break;
default :
//trace("ANY OTHER KEY PRESSED (DEFAULT ACTION IF NEEDED)");
break;
}
};
Key.addListener(keyListener_obj);
function pauseTimer(){
trace("FIRED");
//unload video.swf
videoContainerClip.unloadMovie();
//unload pause.swf
pauseContainerClip.unloadMovie();
//jump to parent frame
_root.gotoAndPlay(3333);
}
good luck..