Aug. 05, 2009maxone
Am I being really dumb?
I installed the free player, no worries. I just downloaded the one that is currently on the front page so i presume it's the latest.
When I add the extra line to the code for either the new skin or the plug in, i get the "This div will be replaced" message instead. I copied all the files to the root.
as soon as i delete the extra line i get the error.
I'm using dreamweaver.
please please help!!
this is the url http://www.airbubblemedia.com/dev03/index.html
and this is the code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<link href="_css/main.css" rel="stylesheet" type="text/css" />
</head>
<body class="oneColElsCtrHdr">
<div id="container">
<div id="header">
<h1>Header</h1>
<!-- end #header --></div>
<div id="mainContent">
<h1> <script type='text/javascript' src='/swfobject.js'></script>
<div id='mediaspace'>This div will be replaced</div>
<script type='text/javascript'>
var s1 = new SWFObject('/player.swf','ply','470','320','9','#ffffff');
s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addParam('wmode','opaque');
s1.addParam('flashvars','file=http://www.airbubblemedia.com/dev03/video.flv');
so.addVariable('plugins', 'viral-1');
s1.write('player');
</script></h1>
<h2>H2 level heading </h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam, justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo porttitor, felis. Nam blandit quam ut lacus. Quisque ornare risus quis ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at, odio.</p>
<!-- end #mainContent --></div>
<div id="footer">
<p>Footer</p>
<!-- end #footer --></div>
<!-- end #container --></div>
</body>
</html>
Nov. 01, 2009samir
install flash player in your system.
Nov. 02, 2009Marten
There is an error in your javascript:
so.addVariable('plugins', 'viral-1');
so is not defined, s1 is defined.
Nov. 02, 2009Bill Bright
Partially what Marten said.
First, to fix the Viral Plugin, you're defining the player with this variable declaration:
var s1 = new SWFObject('/player.swf','ply','470','320','9','#ffffff');
Anything you want to do TO this player must be applied to variable 's1'
you see that other parameters are being added thus:
s1.addParam('wmode','opaque');
but the example code upon which you pulled the viral plugin says:
so.addVariable('plugins', 'viral-1');
try changing it to:
s1.addVariable('plugins', 'viral-1');
Also, I'd move it to BEFORE the flashvars parameter.
---
Now, why it's not replacing the div:
This line:
s1.write('player');
Is trying to write to a div called player. Except your div is called mediaspace.
Change the code to this:
s1.write('mediaspace');
---
Lastly, why are you putting this all within an H1 tag?
Here are some helpful links to learn more about the JW Player™:
Earn money with ads from LongTail's AdSolution. Watch our demos and sign up now!
If you don’t buy a commercial license, you cannot use a JW Player™ on (i) a site that has ads; (ii) a corporate site; or a (iii) CMS. Our licenses are very inexpensive, so what are you waiting for? Buy a license today.