Smashed Video
|
kasmoie
Joined: 2007-04-21
Posts: 20 |
Posted: Fri, 2007-05-04 09:06
|
|
I'm sure this is a quick fix but I cannot seem to find a solution anywhere. When I embed a flash video into my wordpress blog the video gets out of proportion. I've tried a bunch of things, I can't seem to find a place in a style sheet that would manage the flash player... Any tips would be greatly appreciated. Check out the webpage: www.iamkosta.org Many many thanks |
|

Posts: 7933
take a look at the divResize function you included.
the script tags are all messed up.
your WYSIWYG probably changed them a bit.
otherwise, looks great
-s
FlashYourWeb and Your Gallery
Posts: 20
Thank you so much for your quick response. I have had such a great experience with the forums.
You'll have to forgive me but I do not know what the divResize function is or where it resides. Is that part of a style sheet? And the script tags you are referring too, I haven't edited or modified anything in gallery. It's as standard as the way it was installed. I wish I knew more of how the player works, then maybe I could better understand what needs to be altered. The learning curve for these things... so steep.
Thank you so much for your help. It is greatly appreciated.
Regards,
Kosta
Posts: 7933
I'm not familiar with how wordpress inserts gallery items into your stories, but it(wp's wysiwyg) changed the format which is messing with the finicky script tags.
yours looks like this:
(the bold parts are just unnecessary)
when it should look like(javascript needs to be properly formatted):
<div class="one-image"> <script type="text/javascript"> // <![CDATA[ function divResize(id, nw, nh) { var obj = document.getElementById(id); obj.style.width = nw + "px"; obj.style.height = nh + "px"; } // ]]> </script> <div id="flashvideo" style="align:left;width:525px;height:292px"> <object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="100%" height="100%" id="IFid1" class="ImageFrame_none"> <param name="movie" value="http://www.iamkosta.org/gallery/modules/flashvideo/lib/G2flv.swf"/> <param name="FlashVars" value="flvUrl=http%3A%2F%2Fwww.iamkosta.org%2Fgallery%2Fd%2F149-5%2FBalloon%2BProject%2BFINAL.flv&Width=520&Height=380&title=Balloon+Project+FINAL&allowDl=true&thumbUrl=http%3A%2F%2Fwww.iamkosta.org%2Fgallery%2Fd%2F150-6%2FBalloon%2BProject%2BFINAL.jpg&langDownload=Download&langLarge=Large&langNormal=Normal"/> <param name="quality" value="high"/> <param name="scale" value="noscale"/> <param name="salign" value="lt"/> <param name="wmode" value="transparent"/> <param name="allowScriptAccess" value="always"/><embed src="http://www.iamkosta.org/gallery/modules/flashvideo/lib/G2flv.swf" flashvars="flvUrl=http%3A%2F%2Fwww.iamkosta.org%2Fgallery%2Fd%2F149-5%2FBalloon%2BProject%2BFINAL.flv&Width=520&Height=380&title=Balloon+Project+FINAL&allowDl=true&thumbUrl=http%3A%2F%2Fwww.iamkosta.org%2Fgallery%2Fd%2F150-6%2FBalloon%2BProject%2BFINAL.jpg&langDownload=Download&langLarge=Large&langNormal=Normal" type="application/x-shockwave-flash" width="100%" height="100%" quality="high" scale="noscale" salign="lt" wmode="transparent" allowScriptAccess="always" pluginspage="http://www.macromedia.com/go/getflashplayer"/><noembed></noembed></object> </div> </div>if you can edit your story, and correct the messy script tags, all should be fine.
-s
FlashYourWeb and Your Gallery
Posts: 20
ohhh boy. I don't know how to directly edit a story like that... I just use the embed feature that WPG2 lets me do. Man oh man... The webpage is dynamically created and I don't know where it actually gets that code so I can modify it...
My blog entry is literally formatted like this:
<wpg2>video/balloon project final.flv</wpg2>
3 Minutes of wonderful movie for the CSU Research Competition tommorow. Wish me luck.
Posts: 20
well... interestingly enough using that code to embed the video worked wonderfully. It's not exactly the solution I anticipated but it will work for now. If you find out a way to do it with wpg2 let me know!!
I swear you guys are genius'
Posts: 26091
I don't think that WPG2 anticipated gallery items having javascript.
Can you post your query in the WPG2 forums and post a link to it here so I can follow. Perhaps the WPG2 devs will have a solution for the next release of WPG2. There is more WP experts there:
WPG2 2.x Plugin Help
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 20
Absolutely, thanks for the help Dave. Here's a link:
http://www.galleryembedded.com/forums/viewtopic.php?t=7021&highlight=
Posts: 20
Ok so it gets complicated now... According to the guys at WPG2 I needed to put some javascript in the header of my page, i did that, and it fixed everything.
So I decided to take it a step further and fix the double click problem that happens in internet exploder. I followed the instructions in the forum: http://gallery.menalto.com/node/61982
...and then the video was smashed again. I went ahead and re-copied the new javascript that had changed into the header and BAM it fixed the squished video. Then I went to check my site in IE, I got a fancy little error message in the place where the video was supposed to be:
Javascript required to view content.
I went ahead and checked my gallery, low and behold, all of the videos have the same problem.
Any insight on this one?
Posts: 7933
Sure, in your header between the <head></head> tags you can include the necessary javascript so it will always be there when needed.
ie.
<head profile="http://gmpg.org/xfn/11"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>IamKosta.org </title> <meta name="generator" content="WordPress 2.1.3" /> <!-- leave this for stats --> <meta name="keywords" content="The Kosta Equivalent" /> <meta name="description" content="The Kosta Equivalent" /> <script type="text/javascript" src="http://www.iamkosta.org/gallery/modules/flashvideo/lib/swfobject.js"></script> <script type="text/javascript"> function divResize(id, nw, nh) { var obj = document.getElementById(id); obj.style.width = nw + "px"; obj.style.height = nh + "px"; } </script> </head>You would obviously have a lot more stuff in there. But just include our javascript there somewhere.
Then you could go ahead and remove it from gallery/modules/flashvideo/classes/FlashVideoRenderer.class.
This will not likely fix the fact that wp2 surrounds the flash object with a link
<a href="http://www.iamkosta.org/blog/v/video/Balloon+Project+FINAL.flv.html"></a>-s
FlashYourWeb and Your Gallery
Posts: 20
Any idea why I get the "Javascript required to view content" in IE? It's something that didn't happen until I added in your classes and libraries.
Posts: 7933
replace your FlashVideoRenderer.class with this one.
FlashYourWeb and Your Gallery
Posts: 20
Replaced it, didn't make any change in IE and now it doesn't show up in firefox.
www.iamkosta.org
Posts: 7933
Now you've got it twice in your header
<script type="text/javascript" src="http://www.iamkosta.org/gallery/modules/flashvideo/lib/swfobject.js"></script> <script type="text/javascript"> function divResize(id, nw, nh) { var obj = document.getElementById(id); obj.style.width = nw + "px"; obj.style.height = nh + "px"; } </script> <div class="one-image"> <script type="text/javascript" src="http://www.iamkosta.org/gallery/modules/flashvideo/lib/swfobject.js"></script> <script type="text/javascript">// <![CDATA[ function divResize(id, nw, nh) { var obj = document.getElementById(id); obj.style.width = nw + "px"; obj.style.height = nh + "px"; } // ]]></script>Please get rid of the second one so it looks like this:
<script type="text/javascript" src="http://www.iamkosta.org/gallery/modules/flashvideo/lib/swfobject.js"></script> <script type="text/javascript"> function divResize(id, nw, nh) { var obj = document.getElementById(id); obj.style.width = nw + "px"; obj.style.height = nh + "px"; } </script>-s
FlashYourWeb and Your Gallery
Posts: 20
whoops! I was trying to figure out the difference between the two of them. I took it out but it is still not functional.
Posts: 7933
ok, where did the swf go?
http://www.iamkosta.org/gallery/modules/flashvideo/lib/G2flv.swf
is missing.
And
<script type="text/javascript" src="http://www.iamkosta.org/gallery/modules/flashvideo/lib/swfobject.js"></script> <script type="text/javascript"> function divResize(id, nw, nh) { var obj = document.getElementById(id); obj.style.width = nw + "px"; obj.style.height = nh + "px"; } </script>is missing from the head again.
-s
FlashYourWeb and Your Gallery
Posts: 20
Ok got the G2flv.swf back where it's supposed to be, the stuff in the head hasn't left the head-- I'm a bit confused.
I hope this isn't too much to ask but could you possibly Instant message me so we could figure this out? I would really appreciated.
AIM Screename: Kasmoie
I made a donation today, you guys are great.
Posts: 20
I'm really sorry, I had to revert back to the old settings. My school just put out a press release that mentions my website and people were unhappy that the video wasn't working at all.
If you figure out a fix let me know, I'm forever grateful for your help.
-Kosta
www.iamkosta.org
Posts: 7933
tried you on aim
AIM Screename: suprsidr
FlashYourWeb and Your Gallery
Posts: 72
Hey guys, I was able to follow these instructions to get videos embedded in my blog. Now I have run into another problem. I want to embed two movies on the same blog post. However, they are both trying to call devResize with the same div id. This obviously causes problems. Is there any way to tell one movie to use a different div id? I know I can change the id in the div, but how do I tell the movie what the new id is?
Thanks
Ryan
www.justechn.com
Posts: 7933
htmlDiv=myDiv default is videoDiv
also make sure each player instance has its own id ;)
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 72
Thank you for your quick reply. However I don't think I understand what you mean by htmlDiv=myDiv
Here is the javascript I have on the page.
<script type="text/javascript"> // <![CDATA[ function divResize(id, nw, nh) { var obj = document.getElementById(id); obj.style.width = nw + "px"; obj.style.height = nh + "px"; } // ]]> </script>Here is my first movie. it uses the default id of flashvideo
Here is the second movie. I changed the id to flashvideo2
The problem I have now is that because I changed the second movie to flashvideo2 it does not grow to full size when I click the play button.
Posts: 7933
the htmlDiv tells the swf which div to resize.
so you would add another flashvar:
flashvars="flvUrl=....&htmlDiv=flashvideo2
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2