FORUMS: list search recent posts

semi transparent play/pause button on flvplayback component

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Mary Waitrovich
semi transparent play/pause button on flvplayback component
on Jan 19, 2011 at 3:50:46 pm

I have been making a lot of progressive download flash video using the standard flvplayback component that appears when you import video into Flash. I have been having a heck of a time trying to find a tutorial or instructions for adding a semitransparent toggling play/pause button over the video. I've gotten as far as creating a play button that works for this using the code below, but the button doesn't disappear when the regular player Play button is pressed, and I can't figure out how to add in the invisible pause toggle function.

Surely other people do this all the time. Not sure why I can't find the instructions for it. Any help or reference to help much appreciated.

Here's the code I have that works:

myPlayer.source = "madisonforms6_1.f4v";

function playF(e:Event){

Mary Waitrovich
Media Plus You, LCC

Return to posts index

demetri tashie
Re: semi transparent play/pause button on flvplayback component
on Jan 19, 2011 at 8:54:07 pm

you've come upon one of the limits of using the supplied FLVPlayback components. they really are good for a lot of things, but they have their drawbacks too.

if you are using a component with a 'skin', it is difficult for most users to modify anything to do with the skin. the actionscript associated with it is not easy to access!

to get around this, you could create and code your contorls all from scratch for the best customability. if that is too hard, then instead of using a 'skin' you can use the separate video components - like the PlayButton, the PauseButton, the PlayPauseButton, etc

either way, you then make a large play/pause button (with a low alpha) to place over the video, and script the original component button to not only play the video component, but to also make the large button invisible.

something like this:
play_btn.addEventListener(MouseEvent.CLICK, playVideo);
function playVideo(e:MouseEvent):void {;
largePlayPause_btn.visible= false

or you could even use another instance of the video PlayPauseButton component, make it large, and use that for the large button over the video.

i hope this gives you ideas to use

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved