#2 Mar 17, 2005 20:14
There are two answers:
(1) Generally accepted method, which utilizes the <embed> tag (which is deprecated in XHTML) and discussed at [url=http://www.w3schools.com/flash/flash_inhtml.asp]w3schools[/url]
The code looks like:
<object width="550" height="400"> <param name="movie" value="somefilename.swf"> <embed src="somefilename.swf" width="550" height="400"> </embed> </object>
(use this if you don't care about having XHTML-valid code, as there is good backwards-compatible support for the <embed> tag)
or (2) The XHTML-valid code that I (and others?) use instead, which avoids the <embed> tag. The code looks like:
<object type="application/x-shockwave-flash" data="http://yoursite/flash.swf"><param name="movie" value="http://yoursite/flash.swf"></param></object>
(use this if you want valid-XHTML code. I know this to work fine in MSIE6 and Ffox - those are the only two I design for. Don't know about other version or flavors).
There are two things to note:
1) Not such an issue for you, since your flash doesn't have sound, but when embedding multiple flash objects (with sound), having them start automatically can be VERY annoying for visitors. You can elect to have the flash file FREEZE on the first frame and wait for a reader to RIGHT-CLICK and select PLAY by adding the following <param> tag:
<param name="play" value="0">
(The only other way of controlling the play -to the best of my knowledge-, is by authoring the flash and modifying the action scripts.)
2) b2evo does not allow the <object> or <param> tags (and their attributes) by default. What this means, is that IF you just try to cut-n-paste the code and save your blog entry ... it won't pass thru the Html-checker (You'll get an error saying those tags aren't allowed). You have two choices: (a) turn OFF the html-checker in /conf/_formatting.php (just flip it from "1"=ON to "0"=OFF ... then SAVE your entry. Remember to turn the html-checker back on, otherwise all sorts of nasty things MIGHT come your way in user comments. (b) MODIFY the /conf/_formatting.php file to ALLOW those tags and attributes.
Further discussion on THIS topic can be found [url=http://forums.b2evolution.net/viewtopic.php?t=3297&highlight=embed+flash]in this thread[/url] or using SEARCH (keywords "flash and embed")
Hope this helps. :D