How to embed SWF in a web page
Learn how to embed a swf in a webpage and set the flashVar parameters.
1. Using SWF Object
If you don't use the SWF object already, now is the right time. It comes with detailed documentation and you can download it from this page: http://code.google.com/p/swfobject/.
2. Using the code Adobe Flash generates:
Download the PHP function here: phpfunction.html
You will need also this JS File: AC_RunActiveContent.js
How to use the function:
<? $link = '/flash/3d-rotate/images/rotateTool_startpage.swf'; $path = '/flash/3d-rotate/images/deuter/'; $data = Array( "id" => "3d-rotate", "width" => "500", "height" => "375", "src" => $link, "bgcolor" => "#FFFFFF", "flashvars" => "path=".$path ); echo getFlashTag($data); ?>
id is the flash movie id, choose any text you like
width is the movie width
width is the movie height
src is the path to the swf
bgcolor is the bgcolor of the movie
flashvars are the flashvars
If you don't use PHP and want to use the flash generated code, you can download this sample code: adobeflashcode.html. However take a look on how the PHP function is structured to see which parts of the code need to be updated.
You can see also how the flashvars are set in the above example - variable "path" is set the value "deuter".
4. Joomla Integration
Here you can find an example on Joomla Integration: http://www.yofla.com/joomla/index.php?option=com_content&view=article&id=1:3d-rotate-flexi-embed-test.