|
Embedded 3 consecutive videos but only first one loads
10-25-2008, 05:05 PM
|
Embedded 3 consecutive videos but only first one loads
|
Posts: 52
Name: Delon
|
Hi...
I've embedded 3 consecutive videos to my website that are all pulling from this script:
<script type="text/javascript" src="swfobject.js"></script>
I've uploaded the page to my website, but the problem I'm having with browsers (except Firefox) is that only the first video loads...
Anybody have a solution for this? Thanks.
|
|
|
|
10-25-2008, 05:06 PM
|
Re: Embedded 3 consecutive videos but only first one loads
|
Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
|
line 37
there is a missing comma!!!!!
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
|
|
|
|
10-25-2008, 11:09 PM
|
Re: Embedded 3 consecutive videos but only first one loads
|
Posts: 52
Name: Delon
|
What do you mean by line 37 ... comma missing?
Anyhow, here is my code:
<h3><span class="BoldBlue">Video 1</span></h3>
<div id="media">
<div id="noUpdate">
<p>The Camtasia Studio video content presented here requires JavaScript to be enabled and the latest version of the Macromedia Flash Player. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by <a href="http://www.macromedia.com/go/getflashplayer">downloading here</a>.
</p>
</div>
</div>
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject( "vid1.swf", "csSWF", "640", "498", "9.0.28", "#1a1a1a");
so.addParam( "quality", "best" );
so.addParam( "allowFullScreen", "true" );
so.addParam( "scale", "noscale" );
so.addParam( "allowScriptAccess", "always" );
so.addVariable( "autostart", "false" );
so.write("media");
// ]]>
</script>
<h3><span class="BoldBlue">Video 2</span></h3>
<div id="media">
<div id="noUpdate">
<p>The Camtasia Studio video content presented here requires JavaScript to be enabled and the latest version of the Macromedia Flash Player. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by <a href="http://www.macromedia.com/go/getflashplayer">downloading here</a>.
</p>
</div>
</div>
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject( "vid2.swf", "csSWF", "640", "498", "9.0.28", "#1a1a1a");
so.addParam( "quality", "best" );
so.addParam( "allowFullScreen", "true" );
so.addParam( "scale", "noscale" );
so.addParam( "allowScriptAccess", "always" );
so.addVariable( "autostart", "false" );
so.write("media");
// ]]>
</script>
<h3><span class="BoldBlue">Video 3</span></h3>
<div id="media">
<div id="noUpdate">
<p>The Camtasia Studio video content presented here requires JavaScript to be enabled and the latest version of the Macromedia Flash Player. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by <a href="http://www.macromedia.com/go/getflashplayer">downloading here</a>.
</p>
</div>
</div>
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject( "vid3.swf", "csSWF", "640", "498", "9.0.28", "#1a1a1a");
so.addParam( "quality", "best" );
so.addParam( "allowFullScreen", "true" );
so.addParam( "scale", "noscale" );
so.addParam( "allowScriptAccess", "always" );
so.addVariable( "autostart", "false" );
so.write("media");
// ]]>
</script>
|
|
|
|
10-26-2008, 04:47 AM
|
Re: Embedded 3 consecutive videos but only first one loads
|
Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
|
Quote:
|
What do you mean by line 37 ... comma missing?
|
Given the amount of information to diagnose the issue that was provided in post #1. ...
... What do you, think it means?
However;
Rename the objects in the second and third blocks. Having three global objects with the same name is going to cause conflicts.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
|
|
|
|
10-26-2008, 12:53 PM
|
Re: Embedded 3 consecutive videos but only first one loads
|
Posts: 52
Name: Delon
|
Ok -- Chris, I know you know what you are talking about... but can you point out what I'm supposed to do?
It's not for nothing I pasted the code...
Also, this script is contained once in my header:
<script type="text/javascript" src="swfobject.js"></script>
I only need to be shown something once, and I'll be out of your way.
Thanks.
|
|
|
|
10-26-2008, 09:29 PM
|
Re: Embedded 3 consecutive videos but only first one loads
|
Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
|
instead of them all being called "so" where there is every chance they will conflict with each other.
leave the first one as "var so", name the next as "var so1" and the third and last as "var so2 "
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
|
|
|
|
10-26-2008, 09:49 PM
|
Re: Embedded 3 consecutive videos but only first one loads
|
Posts: 52
Name: Delon
|
Thanks for your reply Chris, but unfortunately that didn't solve the problem
I'm working on a deadline here, and this is really stressing me out... I've Googled and Googled and Googled... still couldn't figure it out...
What do you suggest?
Again, here's my code:
<head>
<!-- saved from url=(0025) http://www.techsmith.com/ -->
<title></title>
<script type="text/javascript" src="swfobject.js"></script>
<link href="styles2.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<h3><span class="BoldBlue">Video 1</span></h3>
<div id="media">
<div id="noUpdate">
<p>The Camtasia Studio video content presented here requires JavaScript to be enabled and the latest version of the Macromedia Flash Player. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by <a href="http://www.macromedia.com/go/getflashplayer">downloading here</a>.
</p>
</div>
</div>
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject( "vid1.swf", "csSWF", "640", "498", "9.0.28", "#1a1a1a");
so.addParam( "quality", "best" );
so.addParam( "allowFullScreen", "true" );
so.addParam( "scale", "noscale" );
so.addParam( "allowScriptAccess", "always" );
so.addVariable( "autostart", "false" );
so.write("media");
// ]]>
</script>
<h3><span class="BoldBlue">Video 2</span></h3>
<div id="media">
<div id="noUpdate">
<p>The Camtasia Studio video content presented here requires JavaScript to be enabled and the latest version of the Macromedia Flash Player. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by <a href="http://www.macromedia.com/go/getflashplayer">downloading here</a>.
</p>
</div>
</div>
<script type="text/javascript">
// <![CDATA[
var so1 = new SWFObject( "vid2.swf", "csSWF", "640", "498", "9.0.28", "#1a1a1a");
so.addParam( "quality", "best" );
so.addParam( "allowFullScreen", "true" );
so.addParam( "scale", "noscale" );
so.addParam( "allowScriptAccess", "always" );
so.addVariable( "autostart", "false" );
so.write("media");
// ]]>
</script>
<h3><span class="BoldBlue">Video 3</span></h3>
<div id="media">
<div id="noUpdate">
<p>The Camtasia Studio video content presented here requires JavaScript to be enabled and the latest version of the Macromedia Flash Player. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by <a href="http://www.macromedia.com/go/getflashplayer">downloading here</a>.
</p>
</div>
</div>
<script type="text/javascript">
// <![CDATA[
var so2 = new SWFObject( "vid3.swf", "csSWF", "640", "498", "9.0.28", "#1a1a1a");
so.addParam( "quality", "best" );
so.addParam( "allowFullScreen", "true" );
so.addParam( "scale", "noscale" );
so.addParam( "allowScriptAccess", "always" );
so.addVariable( "autostart", "false" );
so.write("media");
// ]]>
</script>
Thanks for all of the help thus far... hopefully you can help me figure this out.
Last edited by oceankid; 10-26-2008 at 09:55 PM..
|
|
|
|
10-26-2008, 10:05 PM
|
Re: Embedded 3 consecutive videos but only first one loads
|
Posts: 52
Name: Delon
|
I've just tried adding "so1.addParam" and "so2.addParam" in addition to "var so1" and "var so2"... that's didn't work either 
|
|
|
|
10-26-2008, 10:36 PM
|
Re: Embedded 3 consecutive videos but only first one loads
|
Posts: 52
Name: Delon
|
here's my new code... still no go:
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject( "vid1.swf", "csSWF", "640", "498", "9.0.28", "#1a1a1a");
so.addParam( "quality", "best" );
so.addParam( "allowFullScreen", "true" );
so.addParam( "scale", "noscale" );
so.addParam( "allowScriptAccess", "always" );
so.addVariable( "autostart", "false" );
so.write("media");
// ]]>
</script>
<script type="text/javascript">
// <![CDATA[
var so1 = new SWFObject( "vid2.swf", "csSWF1", "640", "498", "9.0.28", "#1a1a1a");
so1.addParam( "quality", "best" );
so1.addParam( "allowFullScreen", "true" );
so1.addParam( "scale", "noscale" );
so1.addParam( "allowScriptAccess", "always" );
so1.addVariable( "autostart", "false" );
so1.write("media");
// ]]>
</script>
<script type="text/javascript">
// <![CDATA[
var so2 = new SWFObject( "vid3.swf", "csSWF2", "640", "498", "9.0.28", "#1a1a1a");
so2.addParam( "quality", "best" );
so2.addParam( "allowFullScreen", "true" );
so2.addParam( "scale", "noscale" );
so2.addParam( "allowScriptAccess", "always" );
so2.addVariable( "autostart", "false" );
so2.write("media");
// ]]>
</script>

|
|
|
|
10-27-2008, 12:23 AM
|
Re: Embedded 3 consecutive videos but only first one loads
|
Posts: 52
Name: Delon
|
OK... I figured it out.
It was a CSS problem.
Camtasia uses div ids ... which obviously can only be used once per page.
I find it quite stupid... softwares piss me off! Well, I do know css inside out, so that was pretty easy to spot once I stopped thinking it was a javascript problem.
<div id="media">
<div id="noUpdate">
<p>The Camtasia Studio video content presented here requires JavaScript to be enabled and the latest version of the Macromedia Flash Player. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by <a href="http://www.macromedia.com/go/getflashplayer">downloading here</a>.
</p>
</div>
</div>
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject( "6vidtut3_82.swf", "csSWF", "640", "498", "9.0.28", "#1a1a1a");
so.addParam( "quality", "best" );
so.addParam( "allowFullScreen", "true" );
so.addParam( "scale", "noscale" );
so.addParam( "allowScriptAccess", "always" );
so.addVariable( "autostart", "false" );
so.write("media2");
// ]]>
</script>
I've colored the problem in red... that is how camtasia outputted the html page of the video, which is completely ridiculous because they are limiting people to adding 1 video per page by using div ids
The idiots should have used div class and this problem would never happen to anyone.
Anyway, thanks for your help... it wasn't a javascript problem though 
|
|
|
|
|
« Reply to Embedded 3 consecutive videos but only first one loads
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|