FORUMS: list search recent posts

New button doesn't stop previous button videoplayback.

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
cowcowcow
suwak
New button doesn't stop previous button videoplayback.
on Sep 11, 2007 at 5:48:14 pm

Hello.

I'm very new to ActionScript, just trying to put a simple portfolio site of mine and don't have enough time to dig flash properly. My site contains buttons, which after click go to given frame in the time line and display videoplayer. Autoplay is false, but when you hit play on the player and the video rolls with audio and then when you don't press stop just another button (all buttons are visible all the time on the stage) it gives another frame and another video player with different content, but the previous audio is still playing! I don't know how to fix it fast and in least complicated way.

ActionScript for button:

this.buttonname_btn.addEventListener(MouseEvent.CLICK, clickListener0);
function clickListener0(event:MouseEvent):void {
gotoAndPlay("framename");
}

And at given frame is a keyframe with videoplayer, and frame after it is actionscript saying gotoAndPlay("previousframe"), so multiple button click doesn't goes to next keyframe with another player.

In short: i need to stop all ongoing playback after button click, but still be able to press play on the player and get content.

Thank you in advance for your help.



Return to posts index

Sher Ali
Re: New button doesn't stop previous button videoplayback.
on Sep 12, 2007 at 11:50:39 am

You have to stop the previous video first.

Are you using a built-in MediaPlayBack component or you are using a simple video object from the library panel?


-----------------
Sher Ali
http://www.webeyestudio.com


Return to posts index

suwak
Re: New button doesn't stop previous button videoplayback.
on Sep 12, 2007 at 12:41:15 pm

I've got stop(); at every keyframe when the video player is, but it just stops flash before looping timeline. I was using import video function, choosing flv file and video player skin, so i guess it's component. What would be the best is some function that stops all video playback when button is clicked but at the same time allows new playback from video player at current frame.


Return to posts index


Sher Ali
Re: New button doesn't stop previous button videoplayback.
on Sep 12, 2007 at 12:56:49 pm

If you are using Flash 8's built-in MediaPlayback component then you can stop the video as:

1- give the video component an instance name e.g. myVideoPlayer
2- call the stop function as: myVideoPlayer.stop();



-------------
Sher Ali
http://www.webeyestudio.com


Return to posts index

suwak
Re: New button doesn't stop previous button videoplayback.
on Sep 12, 2007 at 1:08:00 pm

I'm using Flash 9 and as far as I remember I've tried this and it didn't work.


Return to posts index

suwak
Re: New button doesn't stop previous button videoplayback.
on Sep 12, 2007 at 9:58:38 pm

It works, sorry :)
But now I have to list stop for every video for each button individually, is there a way to stop all streaming video at once?


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]