01-03-2008, 12:44 AM
I have embedded an object (flash video) and it automatically starts when the page is loaded. Does anyone know of a method to not start these automatically but have a play intro link/button that allows this movie to start?
Something like the youtube play button in the movie would be nice.
<object width="180" height="180">
<param name="movie" value="http://www.domain.com/swf/movie.swf">
<embed src="http://www.domain.com/swf/movie.swf" width="180" height="180" loop="false">
01-03-2008, 03:36 AM
At first this is a Flash issue. You have put a play button in the Flash movie, hence, you have to set automatic (or manual) playback in your Flash file, not in the HTML.
There is a non-standard (i.e. invalid) autoplay attribute for the similarly non-standard (i.e. invalid) embed element which you can set to 0 (don’t play) or 1 (play automatically). However, this won’t generate a “play” button, ’cause as I said, this is a Flash thing. Also this is more meant for playback of plain audio files, not flash.
Likewise, there is a similar value for the <param> element (<param name="autoplay" value="true [/false]">). However, functionality is based on the settings of/in the Flash movie (i.e. you have to enable it there before setting it in the HTML will do anything).
If I go to YouTube and choose a video it starts playback automatically. The play button only comes after one pass.
01-03-2008, 09:34 AM
am a bit confused now...
I've tried to keep my website as much as possible to standards and what I read above makes me feel that I am now using non-standard elements to display a flash movie.
Is there a "better" or let's say more standardized way to do so?
If I understood you correctly, I need to go to my gfx team to tell them to change the flash movie in such a way that it does not automatically start.
Is that correct?
Thanks for your help.
01-03-2008, 10:46 AM
I take it that you are using the <embed> tag to display your Flash movie then? <embed> is depracated in HTML 4.01 and if you are using a correct doctype (preferably strict) this will not validate as HTML. You need to use something like the Flash Satay method which is described here (http://www.alistapart.com/articles/byebyeembed)
And as for the second part, yes, you need to have the movie begin with a 'play' button so that it doesn't actually start until that button is pressed
01-03-2008, 12:11 PM
with the help of that link you have given me, the object is now coded as follows:
data="http://www.nemesiswar.net/swf/intro_8.swf" width="180" height="180" id="">
<param name="movie" value="http://www.nemesiswar.net/swf/intro_8.swf" />
<param name="play" value="false" />
<param name="loop" value="false" />
<param name="quality" value="autohigh" />
That seems to already work for me, I now need to find out what other param settings I can use for the flash files.
Would this then be according to the real (non-microsoft) standard?
01-03-2008, 02:26 PM
Yeah that should work. However, I suspect that you’ll get a notice in IE that you have to confirm whether or not you wanna display the object. This is because there was a lawsuit (http://en.wikipedia.org/wiki/EOLAS).
So, some ingeious mind developed a technique to prevent that and it’s called SWFObject (http://blog.deconcept.com/swfobject/). That’s how most people do it nowadays and that’s also how they do it at YouTube.
01-03-2008, 03:54 PM
Yeah that should work. However, I suspect that youíll get a notice in IE that you have to confirm whether or not you wanna display the object. This is because there was a lawsuit (http://en.wikipedia.org/wiki/EOLAS).
So, some ingeious mind developed a technique to prevent that and itís called SWFObject (http://blog.deconcept.com/swfobject/). Thatís how most people do it nowadays and thatís also how they do it at YouTube.
Thank you very much indeed. My flash movies are now called using swfobject ;)
01-03-2008, 03:57 PM