HTML and CSS Reference
In-Depth Information
FiGure 25-2
Many developers, including those with Adobe and Longtail Video, have leveraged a powerful, open
source JavaScript library for SWF playback called SWFObject. You can either download it from
its home in the Google Code library ( ) or , as JW Player
does, just reference the file with a <script> tag in the <head> of your document:
<script type=”text/javascript”
Next, you'll need to create a block-level containing element — either a <div> or <p> tag — with an
id attribute defined:
<div id=”myVideo”>
Finally, you insert the JavaScript functions, wrapped up neatly in a <script> tag within the con-
taining element:
<script type=”text/javascript”>
var flashvars = { file:'../assets/Star2.flv',autostart:'true' };
var params = { allowfullscreen:'true', allowscriptaccess:'always' };
var attributes = { id:'player1', name:'player1' };
flashvars, params, attributes);
Take a look at the JavaScript broken down one line at a time.
var flashvars = { file:'../assets/Star2.flv',autostart:'true' };
Search WWH ::

Custom Search