Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

No screencolor... Help!

6 replies [Last post]

Hi!
I want the background of my player to blend in with the page it is on, but I cannot get it yellow, just ordinary black. Can anyone see what is wrong in this code...?
Thanks in advance!

<script type="text/javascript"
src='res/embed/swfobject.js'></script>

<div id='player'>Du måste ha Flash plug-in i din webläsare!</div>

<script type="text/javascript">
var s1 = new SWFObject('res/embed/player.swf','mpl',240,135,'9');

s1.addParam('allowscriptaccess','always');
s1.addParam('allowfullscreen','true');

s1.addParam('flashvars','&file=Omtecken05_gul480270.flv&screencolor=FFFF99&plugins=captions-1,quickkeys-1&icons=false&controlbar=none');

s1.write('player');
</script>

<script type="text/javascript">
  var s1 = new SWFObject('res/embed/player.swf', 'mpl', '240', '135', '9.0.124', '#FFFF99');
      s1.addParam('allowscriptaccess',   'always');
      s1.addParam('allowfullscreen',     'true');
      s1.addParam('bgcolor',             '#FFFF99);
      s1.addVariable('file',             'Omtecken05_gul480270.flv');
      s1.addVariable('screencolor',      'FFFF99');
      s1.addVariable('plugins',          'captions-1,quickkeys-1');
      s1.addVariable('icons',            'false');
      s1.addVariable('controlbar',       'none');
      s1.write('player');
</script>

Thanks hobbs for your help! Unfourtunatly did I not get this code to work at all. Should there not be an swfobject.js somewhere, or is there something in the code that is not compatible with my page?

You need the rest of the code that you posted. I only posted the part that I changed.

<script src="res/embed/swfobject.js"></script>

<div id="player">Du måste ha Flash plug-in i din webläsare!</div>

Thanks hobbs! I will try this - I am not so good at code so I did not see what was missing. My aim was to get rid of the dark shade to the right of the player at
http://www.teckenkurs.nu/teckenkommunikation.htm

It is not the width (I think...) that is the problem, it is something from the player... I will try to make the background yellow,,,
Regards,
Håkan

Hi again!
I tried to paste in your code, and the flv runs fine, but the screen color is not yellow. When open the page, the screen is black. When adding a control bar, I also get two black stripes to the left and the right of the screen - as wide as the control bar. I would like it to just be yellow to blend in with the background. When I try the FFFF99 value in the setup wizard it generates the code you wrote above, and the sample player gets a yellow screencolor... but, not in my project...

I must be doing something wrong here...
/H

 
Your page as delivered from your server doesn't have any of the color parameters or flashvars that I suggested in my post above.

This should go in the head element of your HTML document:

<script src="res/embed/swfobject.js"></script>

This should go in the body of your HTML document where you want the player to appear. It's OK to wrap it in other HTML elements for formatting, positioning, etc.

<div id="player"><a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Get the Adobe Flash Player to see this video.</a></div>

Update the alternate content message to be appropriate for the language that you are using.

This should go anywhere after the container div, NOT wrapped in any HTML elements. I would suggest placing the JavaScript code block just before the closing body tag.

<script type="text/javascript">
  var s1 = new SWFObject('res/embed/player.swf', 'mpl', '275', '174', '9.0.124', '#FFFF99');
      s1.addParam('allowscriptaccess',   'always');
      s1.addParam('allowfullscreen',     'true');
      s1.addParam('bgcolor',             '#FFFF99);
      s1.addVariable('file',             'Omtecken05_gul480270.flv');
      s1.addVariable('screencolor',      'FFFF99');
      s1.addVariable('plugins',          'captions-1,quickkeys-1');
      s1.addVariable('icons',            'false');
      s1.addVariable('controlbar',       'none');
      s1.write('player');
</script>

You should specify a minimum flash version of at least v9,0,124,0 to make sure that your users have a version of the Adobe Flash Player that will support the JW FLV Player and the currently supported media.

The Flash content will be instantiated by SWFObject as an object element with a size of 275x174. Anything outside of that is coming from your HTML, not the player. You can temporarily put a border around the player with inline CSS to see the area that the player is using.

<div id="player" style="border:solid 1px #808080;"><a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Get the Adobe Flash Player to see this video.</a></div>

To keep your page from "jumping around" when the Flash content is embedded, you might want to specify a size for the container div, so that space is reserved for the Flash content.

<div id="player" style="width=275;height=174"><a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Get the Adobe Flash Player to see this video.</a></div>