2

I am creating an animation within Flash CS4 in Actionscript 2.0 / Flash Player 7

At the moment I have a handler (Movie Clip) called myHolder that is used to play other swf files within one main swf file, when called by a button

Within a button that load the swf into the main timeline - For Example

on (press)
{
    loadMovie("BulletTrainDRAFT.swf", myHolder);
}

This works fine with bring other swf files into the main swf file timeline, but when I bring a swf file that has video controls for a video within it, they do not respond within the handler when played, but they do work when that swf file is played within its own external flash player window (The video is within a (Movie Clip) on its own timeline within its design fla)

Video buttons - ActionScript 2.0

btnStop.onPress = function(){

    _root.vid.stop();

}
btnPlay.onPress = function(){

    _root.vid.play();

}

btn_fastforward.onPress = function(){

    _root.vid.nextFrame();

}

btn_Rewind.onPress = function(){

    _root.vid.prevFrame();

}

I tried ActionScript 3.0 code as well

Pausebtn.addEventListener(MouseEvent.CLICK,pauseHandler);
Stopbtn.addEventListener(MouseEvent.CLICK, stopHandler);
Playbtn.addEventListener(MouseEvent.CLICK,playHandler);

function stopHandler(event:MouseEvent):void {
// Pause the stream and move the playhead back to
// the beginning of the stream.
video.gotoAndStop(1);
}
function playHandler(event:MouseEvent):void {
// Pause the stream and move the playhead back to
// the beginning of the stream.
video.play();
}
function pauseHandler(event:MouseEvent):void {
// Pause the stream and move the playhead back to
// the beginning of the stream.
video.stop();
}

Problem I have I think, is that a movie the external swf loads on the existing timeline as a child and doesn't unload the timeline resulting the actionscript not functional, but I can't fix this.

2
  • What is _root.video ? If the SWF is loaded into myHolder and you want to control it main timeline, for exemple to stop it, then you need to use myHolder.stop(). There is a loading time so you should take a look at the MovieClipLoader class (in AS2). Commented Apr 18, 2013 at 19:25
  • This problem has been solved now, but thank you again for your suggestion and help ^_^ Commented Apr 18, 2013 at 21:14

1 Answer 1

4

This was fixed by adding

this._lockroot=true

to the video main fla timeline, after some help on the adobe forums ^_^

Thank you again everyone for your help

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.