FORUMS: list search recent posts

When I click button... I want my video to stop

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
joseph wilkins
When I click button... I want my video to stop
on Nov 5, 2010 at 8:09:48 pm

So I have a simple flash movie that autoplays a video when you open a page.

The video is using the FLV playback component.

For complex reasons, I do NOT want to have a skin on the video that plays, but I want to have a button on the page that when clicked stops the video playing... so I need to target the video component with the button.

Can this be done?

Thanks.


Return to posts index

demetri tashie
Re: When I click button... I want my video to stop
on Nov 5, 2010 at 11:41:57 pm

are you talking about a custom button in the swf or a button outside of the swf in the html to control/stop the video component?

either way can be done but they are coded very differently


Return to posts index

joseph wilkins
Re: When I click button... I want my video to stop
on Nov 6, 2010 at 1:34:26 am

Just a regular button on the page that when clicked stops the video


Return to posts index


demetri tashie
Re: When I click button... I want my video to stop
on Nov 6, 2010 at 1:39:16 am

INside or OUTside the SWF ?????


Return to posts index

joseph wilkins
Re: When I click button... I want my video to stop
on Nov 6, 2010 at 1:44:43 am

Oh... Inside the same swf


Return to posts index

demetri tashie
Re: When I click button... I want my video to stop
on Nov 6, 2010 at 2:03:44 am

ok, that is very easy.

you can either just drag out a stop button from the Components Panel ( it is under Video )
and with nothng else, it will know to be asociated with the instance of the FLVPlayback component you are using.

if you want a more custom button, you will need to add an event listener to the button to trigger the stop function of the video player:

myButton.addEventListener(MouseEvent.MOUSE_DOWN, stopVideoFunction);
function stopVideoFunction(evt:MouseEvent):void
{
myFLVPlaybackComponent.stop();
}


Return to posts index


joseph wilkins
Re: When I click button... I want my video to stop
on Nov 6, 2010 at 2:12:45 am

So the stop component sounds great... but how will it know which video to stop?

Just to clarify would you please look at the page I am trying to fix...

http://www.pro-creative.com

enter the site and click on the "Corporate Video" link.

The talking guy is the video I want to stop playing as soon as someone clicks on one of the video examples below.

So given this... how would I use the stop component?

Thanks sooooooo much for your help!



Return to posts index

demetri tashie
Re: When I click button... I want my video to stop
on Nov 6, 2010 at 3:32:34 am

then make sure the component stop button has an instance name - say it is "compStopBtn"

then just declare it to be associated with whatever video player componet you want it to control:

flvPlayer2.stopButton=compStopBtn
the above code would have it associated with flvPlayer2

hope that helps


Return to posts index

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