views:

11979

answers:

3

I'm embedding a Flash video into an HTML and would like the user to have to click it to begin playing. According to the Adobe <object> / <embed> element documentation, there are variety of methods to do this:

1) Add a Flash parameter inside the <object> tag:

<param name="play" value="false">

2) Add the attribute play inside the <embed> tag:

<embed ... play="false">

3) Add the attribute flashvars inside the <embed> tag:

<embed ... flashvars="play=false">

Which is awesome. Only ... none of them work for me:

http://johnboxall.github.com/test/flash/flash.htm

My code looks like this now:

<object width="590" height="475">
 <param name="movie" value="untitled_skin.swf">
 <param name="play" value="false">
 <embed src="untitled_skin.swf" width="590" height="475" type="application/x-shockwave-flash" play="false" flashvars="autoplay=false&play=false" menu="false"></embed>
</object>

Anyone have any ideas? What am I doing wrong?

+4  A: 

A couple of wires are crossed here. The various autoplay settings that you're working with only affect whether the SWF's root timeline starts out paused or not. So if your SWF had a timeline animation, or if it had an embedded video on the root timeline, then these settings would do what you're after.

However, the SWF you're working with almost certainly has only one frame on its timeline, so these settings won't affect playback at all. That one frame contains some flavor of video playback component, which contains ActionScript that controls how the video behaves. To get that player component to start of paused, you'll have to change the settings of the component itself.

Without knowing more about where the content came from it's hard to say more, but when one publishes from Flash, video player components normally include a parameter for whether to autoplay. If your SWF is being published by an application other than Flash (Captivate, I suppose, but I'm not up on that) then your best bet would be to check the settings for that app. Anyway it's not something you can control from the level of the HTML page. (Unless you were talking to the SWF from JavaScript, and for that to work the video component would have to be designed to allow it.)

fenomas
A: 

use <param name="movie" value="untitled_skin.swf&autoStart=false">

Duke