Log in

View Full Version : Problem embedding Video Player



europe451
04-21-2010, 06:39 PM
So this may sound really dumb, but I am having problems with my embedding. The problem seems to be when I attempt to embed using

<object> <param><embed> etc...

The .swf shows up but I don't see a player nor anything from the xml playlist (thumbs).

However, the really odd thing is that when I embed it using <iframe src=""> there are no problems.

I also Published through Flash and it seems to work fine in it's own .html doc, but I can't get it to work in my page without an iframe.

Regular embedding (does not work)


<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="900" height="440" id="motiongraphicsVideoPlayer" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="flash/motiongraphicsVideoPlayer.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#cbcfd8" /> <embed src="flash/motiongraphicsVideoPlayer.swf" quality="high" bgcolor="#cbcfd8" width="900" height="440" name="motiongraphicsVideoPlayer" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

iframe (does work)


<iframe src="flash/motiongraphicsVideoPlayer.swf" width="900" height="440" frameborder="0" scrolling="no"></iframe>

I really don't want to use iframes, but I can't get it to work any other way.

BLiZZaRD
04-21-2010, 07:27 PM
I am going to go over really quickly how to properly embed. It fairly simple, but keep along.

The reason for this is mainly because the embed and object tags aren't made for all browsers. So here is what you are going to do:

1. Download the attached zip file and extract it to your desktop. Inside find the folder named "swo" and upload the entire thing as-is to your server. anywhere is fine, just inside the root is perfect, so it can be accessed at : http://www.yoursite.com/swo/

2. Open your html page and copy and paste the following code where you want your Flash movie to appear on the page:



<div id="flashcontent">

<strong>You need to upgrade your Flash Player</strong>
This is replaced by the Flash content.
Place your alternate content here and users without the Flash plugin or with
Javascript turned off will see this. Content here allows you to leave out <code>noscript</code>
tags. Include a link to <a href="swfobject.html?detectflash=false">bypass the detection</a> if you wish.
</div>

<script type="text/javascript">
var so = new SWFObject("yourMovie.swf", "yourMovie", "550", "400", "8.0.0", "#323935");
so.addParam("quality", "best");
so.addParam("wmode", "transparent");
so.write("flashcontent");
</script>


3. add the following line to your <head> section:



<script type="text/javascript" src="/swo/swfobject.js"></script>


4. alter the code to suit your needs. You will need to change the following:
a. From step 2 above, your flash movie name, size, location etc needs to be put in it's place. Replace the info above with the info of your movie.
b. ensure the location of the swfobject.js is correct.

5. Once all files are uploaded and referenced in the code correctly, your movie should appear just fine. If not, double check the locations of all the files.

This is SWFObject 1.5 there is a 2.0 version but it has a lot more power and variables. This is the bare minimum of what you need. Once you have it working, and you want to play around with it, check out this page (http://blog.deconcept.com/swfobject/) for all of the SWFO1.5 variables and how to use them.

Once you have that check out the 2.0 version found here (http://code.google.com/p/swfobject/) and you will be on your way.

europe451
04-21-2010, 09:01 PM
Hey thanks again for the reply.

I tried what you suggested and I am still having the same problem

See both here! (http://www.erikcarlsonmedia.com/test.html)

The top example was done with the code you wrote and the bottom is the iframe.

BLiZZaRD
04-21-2010, 09:12 PM
Hey.. in the code I gave you...

change the "8.0.0" to 9.0.0

I will have a deeper look while you do that.


<EDIT>
The "problem" is with the Flash file itself. I am not sure, yet, as to why. I am investigating.

europe451
04-21-2010, 09:24 PM
Alright, I really appreciate your help.

BLiZZaRD
04-21-2010, 09:27 PM
Do you have the FLA file for this Flash?

If so, can you attach it here or upload it somewhere so I can download it and have a look?

europe451
04-21-2010, 09:34 PM
File is uploaded here (http://erikcarlsonmedia.com/swo/videoeditingVideoPlayer.fla)

BLiZZaRD
04-21-2010, 09:42 PM
Okay, I got it. I am headed out for my lunch break in a minute. When I return I will have a look and see if I can figure this out. I have narrowed it down to some call or lack of a call in the player, I still don't know why, but I tested the code I posted with 6 other flash videos and all of them worked except for yours.

It is very odd. I will figure it out eventually though. :)

BLiZZaRD
04-22-2010, 01:49 AM
A little more complicated than it first appeared, and will take me a little bit of time to diagnose.

The good news is I have everything I need on my home computer.

The bad news is I am currently working 12+ hour days, and I am still at work right now. Also, I won't be on my home computer tonight, and probably not until I get home tomorrow night.

If you have the time (and patience) I will get to it ASAP. It has become more of a quest for me now. I just need the time to work on it. And to get some sleep.

Look for an update in about 15 hours or so. Sorry.

europe451
04-22-2010, 02:14 AM
That's alright if it takes that long, the iFrame will work for now.

Again I appreciate you taking the time to work on this.

BLiZZaRD
04-23-2010, 07:52 PM
I haven't forgot you, work is just being a pain right now and I don't have a day off til Sunday, which is when I will be able to delve into this properly.

europe451
04-23-2010, 08:04 PM
Understandable, I'll keep checking back.

thanks

europe451
04-26-2010, 08:08 PM
Blizzard,

Just checking in and seeing if you had a chance to take a look at the code.

Thanks

BLiZZaRD
04-27-2010, 07:31 PM
I have, and I am. I am not seeing anything that could cause this, but I am still doing some testing.

europe451
05-03-2010, 02:23 PM
Hey Blizzard,

Just checking in to see if you have been able to find out if anything is wrong from testing.

Thanks.

BLiZZaRD
05-05-2010, 01:55 AM
Nothing yet. I have another friend of mine working on it as well.

europe451
05-05-2010, 06:43 PM
Wow, this is turning into a rather larger project than anticipated.

Thanks.

BLiZZaRD
05-05-2010, 07:43 PM
Its probably actually something very very small, like a missing semi-colon. Just having the right eyes spotting it at the right time... thats the tricky part :D

BLiZZaRD
05-14-2010, 10:02 PM
Okay, I have some things. I can't test locally for obvious reasons, but I did test with a few of my files. I was able to recreate the problem and it was due (for whatever reason, I do not know why) to using relative URIs in the flash and XMLs. When I just used "/loadMe.xml" for example, the movie stopped playing, but when I changed it to a full http://mysite.com/flash/loadMe.xml" it all worked.

So, since I can't alter the forms and xml and fla's that are on your site, I would suggest going through them and change each URI reference to a complete URL and test it that way.

I would also make back ups of everything first, you know, just in case. But it worked for me. Something about the iFrames being able to use cross-domain crap and I don't know all what. But anyway, give that a try on your test page and see what happens. If it works, then great! If it does not, then I will go back to the drawing board. :D

akitodito
05-18-2010, 02:47 PM
Oopman is dead on about whats in the videoframe.swf. Its nothing more than a Video Frame that you can load so that the object you need to display video is available since like oopman said you cant create 1 through 3DFA or actionscript.

I havent tried the player in v4.6 but it should work. Oopman did you try and export to v6 of flash or better like maxxxo suggests?

Thanks to both of you.

europe451
06-08-2010, 03:19 AM
Hey Blizzard,

Just wanted to let you know that your suggestion worked. I basically turned anything that was linking anywhere into full complete links and now I don't have a problem.

Thanks again.

europe451
06-17-2010, 02:55 PM
A new twist to this problem.

I created a new domain name and was switching all my pages over and for some reason the flash isn't showing up anymore. I have the .fla files the same, but with the updated address. The new SWO is identical to the one on the original page.

Original:


<div id="videoPlayer">
<strong>You need to upgrade your Flash Player</strong>

</div>

<script type="text/javascript">
var so = new SWFObject("flash/VideoPlayer.swf", "Demo", "660", "365", "9.0.0", "#323935");
so.addParam("quality", "best");
so.addParam("wmode", "transparent");
so.addParam("menu", "true");
so.write("videoPlayer");
</script>
<br />

Updated:

<div id="videoPlayer">
<strong>You need to upgrade your Flash Player</strong>

</div>

<script type="text/javascript">
var so = new SWFObject("flash/VideoPlayer.swf", "660", "365", "9.0.0");
so.addParam("quality", "best");
so.addParam("wmode", "transparent");
so.addParam("menu", "true");
so.write("videoPlayer");
</script>
<br />




also, just to test I put it up there in the iFrame again and it worked in there.