Thanks for your response graphixboy. I tried your suggestion, but I'm afraid it didn't work. Could you please tell me what I'm doing wrong?
Here are the two ways I tried your solution.
First, in the AS, which I control the different states of my buttons, I added the pages.myMovie.pause(); to the down states of all of my other buttons. This resulted in having the movie to play fine, but I was unable to click on any of my other buttons. The down state for them was no longer functioning.
The way my buttons are structures are as follow:
I have a movie clip which contains all of my buttons. The AS controls the buttons. An example for one would be:
///////// BUTTON 1 CLICK FUNCTIONS
function mainBtn1Over(event:MouseEvent):void {
mainBtn1.gotoAndPlay("over");
}
/////////
function mainBtn1Out(event:MouseEvent):void {
mainBtn1.gotoAndPlay("out");
}
/////////
function mainBtn1Down(event:MouseEvent):void {
//pages.myMovie.pause(); <<----- This resulted in my down not functioning
mainBtn1.gotoAndPlay("down");
pages.gotoAndPlay("page1");
}
Pages is another movieclip, that I control all my pages and add some animation as they get displayed. Each page in Pages Movieclip, has its own movie clip (page1, page2,...) and the code to load the content can be seen in the example below.
Then I thought I will add this when I'm actually loading the contents of these pages(most of my pages are getting loaded, using the following code:)
import flash.events.Event;
import flash.events.IOErrorEvent;
import flash(dot)net.URLLoader;
import flash(dot)net.URLRequest;
import flash.display.Loader;
var swfLoader = new Loader();
var urlReq:URLRequest = new URLRequest("page1.swf");
pages.myMovie.pause();
swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoadComplete);
swfLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, swfLoadError);
swfLoader.load(urlReq);
function swfLoadComplete(evt:Event):void
{
var loader:Loader = Loader(evt.target.loader);
addChild(loader.content);
swfLoader.removeEventListener(Event.COMPLETE, swfLoadComplete);
}
function swfLoadError(evt:IOErrorEvent):void
{
trace("Unable to load swf ");
swfLoader.removeEventListener(IOErrorEvent.IO_ERROR, swfLoadError);
}
I had the following error message:
1120: Access of undefined property pages.
myMovie is the instance name I have given to my page 2, in Pages movieclip, which loads my video.
I hope this helps in clarifying how my code is structured.
Thanks.