Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2008-11-27, 03:23 PM   #1
LD
wtfwjd?
 
LD's Avatar
 
Join Date: May 2007
Posts: 2,103
Question about JW FLV Media Player

I think a couple of people use this, and I have been wanting to use embedded vids on my freesites...so I downloaded it, but I can only get one video per page to work.

On the page below I created two divs, but only one shows. I've tried it without divs, different clips, but still can't seem to get the second one to show up...I also tried moving the
Code:
<script type='text/javascript' src='/mediaplayer/swfobject.js'></script>
down in the body into each idividual div...no luck.

Here's what I came up with...

http://www.lusciousdelights.com/testplayer5.html

The "clip 2" has identical code...I must be missing something. I would like to be able to put 3 or 4 clips on one web page.

Here's the code:

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>
<style type="text/css">
<!--
.player {
	border: medium solid #FF0000;
	height: 350px;
	width: 470px;
	margin-right: auto;
	margin-left: auto;
	text-align: center;
	vertical-align: bottom;
	padding: 5px;
	clear: both;
	margin-top: 7px;
	margin-bottom: 7px;
}
-->
</style>
  <script type='text/javascript' src='/mediaplayer/swfobject.js'></script>
</head>

<body>
<div class="player">
Clip 1

  <div id='preview'>This div will be replaced</div>

  <script type='text/javascript'>
  var s1 = new SWFObject('/mediaplayer/player.swf','ply','470','320','9','#ffffff');
  s1.addParam('allowfullscreen','true');
  s1.addParam('allowscriptaccess','always');
  s1.addParam('wmode','opaque');
  s1.addParam('flashvars','file=http://content.bitsontherun.com/videos/3ta6fhJQ.flv');
  s1.write('preview');
</script>
</div>

<div class="player">

Clip 2
  <div id='preview2'>This div will be replaced</div>

  <script type='text/javascript'>
  var s1 = new SWFObject('/mediaplayer/player.swf','ply','470','320','9','#ffffff');
  s1.addParam('allowfullscreen','true');
  s1.addParam('allowscriptaccess','always');
  s1.addParam('wmode','opaque');
  s1.addParam('flashvars','file=http://content.bitsontherun.com/videos/3ta6fhJQ.flv');
  s1.write('preview');
</script>
</div>
</body>
</html>
__________________
Artisteer Wordpress Theme Generator Create Custom Themes!
My Little Network
LD is offline   Reply With Quote
Old 2008-11-28, 03:26 AM   #2
Alex B
Aw, Dad, you've done a lot of great things, but you're a very old man, and old people are useless
 
Join Date: May 2005
Posts: 29
Send a message via ICQ to Alex B
For second one - s1.write('preview'); should be s1.write('preview2'); - that's the ID of the div to be replaced
Alex B is offline   Reply With Quote
Old 2008-11-28, 08:00 AM   #3
LD
wtfwjd?
 
LD's Avatar
 
Join Date: May 2007
Posts: 2,103
Quote:
Originally Posted by Alex B View Post
For second one - s1.write('preview'); should be s1.write('preview2'); - that's the ID of the div to be replaced
That it!...thanks so much!
__________________
Artisteer Wordpress Theme Generator Create Custom Themes!
My Little Network
LD is offline   Reply With Quote
Old 2008-12-09, 03:42 AM   #4
Daniel_webcams
They have the Internet on computers, now?
 
Daniel_webcams's Avatar
 
Join Date: Dec 2008
Posts: 142
yeah, I had the same problem

yeah, I had the problem, the ID of the div was the problem. but now is solved.
Daniel_webcams is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:19 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc