homepage Welcome to WebmasterWorld Guest from 107.20.131.154
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Accredited PayPal World Seller

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

    
Excellent player needs hlp embedding into flash site html
bizzz3




msg:4185223
 7:21 am on Aug 11, 2010 (gmt 0)

I found a great free player @flvplayerlite.com/ it's only 7kb, but it's author protected, so I can't import it into my fla file. Here is my best try from the (Italian to English) documentation to embed it. Can you spot where i went wrong? Any help is sincerely appreciated. The flash site has been tested and works well. So i deleted the component FLV player and now ready to install this one. I have the player.swf and js/swfobject in server directory. Once this is solved, I suppose will need to specify an <X,Y> location, but that's next.

cs5 as2

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">


<head>
<title>mysite</title>
<script type="text/javascript" src="js/swfobject.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css" media="screen">
html, body { height:100%; background-color: #121212;}
body { margin:0; padding:0; overflow:hidden; }
#flashContent { width:100%; height:100%; }
</style>
</head>

<body>
<script type="text/javascript">
<div id="playerLite"></div>
var flashvars = {
vidWidth: "420",
vidHeight: "238",
vidPath: "http://www.mysite.com/player/strobe.flv",
thumbPath: "http://www.mysite.com/player splash.png",
autoPlay: "false",
autoLoop: "true",
watermark: "show",
seekbar: "show"
};
var params = {
menu: "true",
allowfullscreen: "true",
allowscriptaccess: "always"
};
var attributes = {
id: "playerLite",
name: "playerLite"
};

swfobject.embedSWF("swf/playerLite.swf", "playerLite", flashvars.vidWidth, flashvars.vidHeight, "9.0.0","swf/expressInstall.swf", flashvars, params, attributes);
</script>

<div id="flashContent">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="766" height="850" id="mysite" align="middle">
<param name="movie" value="mysite.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#121212" />
<param name="play" value="true" />
<param name="loop" value="false" />
<param name="wmode" value="window" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="mysite.swf" width="766" height="850">
<param name="movie" value="mysite.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#121212" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflash">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>

</body>
</html>

 

astupidname




msg:4185257
 8:29 am on Aug 11, 2010 (gmt 0)

vidPath: "http://www.mysite.com/player/strobe.flv",
thumbPath: "http://www.mysite.com/player splash.png",

Just wondering, is the thumbPath supposed to have a '/' between 'player' and 'splash.png' ?

swfobject.embedSWF("swf/playerLite.swf", "playerLite",

I do not see any block elements on your page with an id of "playerLite". Since you are using the 'dynamic' method of swfobject to embed the playerLite.swf file, swfobject will look for an element with that id and replace it with the player. So try adding <div id="playerLite"></div> somewhere's in the page.

p.s. Welcome to webmasterworld!

bizzz3




msg:4185411
 3:40 pm on Aug 11, 2010 (gmt 0)

Thanks for taking interest.

quote:Just wondering, is the thumbPath supposed to have a '/' between 'player' and 'splash.png' ?

answer: my lousy naming convention of picture. Its in the main directory, i probably should move it to player folder.

quote:I do not see ...<div id="playerLite"></div>

answer: It's at the top, right below body, here:
<body>
<script type="text/javascript">
<div id="playerLite"></div>
var flashvars = {

I forgot to mention earlier that the flash site comes up fine, only the player is absent.

For those who are interested in the player or the documentation, you could take a look at the sudo-link I provided above.

Thanks for the effort Astupidname, but don't give up on me.

astupidname




msg:4185836
 7:30 am on Aug 12, 2010 (gmt 0)

answer: It's at the top, right below body, here:
<body>
<script type="text/javascript">
<div id="playerLite"></div>
var flashvars = {


Oops, guess I did not see the playerLite div because it is actually (invalidly) inside the <script tag -oops on your part!- Take it out of the script and see then! :)

bizzz3




msg:4186924
 4:31 am on Aug 14, 2010 (gmt 0)

good eye astupidname,

yes, that would make perfect sense, it doesn't belong in scripts section.

So I put it here:just past the script section

</script>
<div id="playerLite"></div>
<div id="flashContent">

no player showed up, but i'm still kicking it around.
I don't give up easy :)

astupidname




msg:4186946
 6:20 am on Aug 14, 2010 (gmt 0)

So I put it here:just past the script section

Try the other way, put the "playerLite" div above the script. Either that or try wrapping the contents of that script in a window.onload definition:
window.onload = function () {
//complete contents of the script here
};

bizzz3




msg:4189577
 3:38 am on Aug 20, 2010 (gmt 0)

Finally found the problem:

<head>
<title>mysite</title>
<script type="text/javascript" src="js/swfobject.js"></script>

yup the swfobjec.js needs to be in a js folder.

The price a person pays for getting code instead of writing it...

thanks to all

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved