Jump to content

change javascript opacity


garevn

Recommended Posts

Is there any chance to change the opacity of this player? i have no idea...

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script><div id="player-holder"></div><script type="text/javascript">var options = {};options.playlistXmlPath = "player/playlist/playlist.xml";options.firstColor = "00FFFF";options.secondColor = "ee1d24";options.backColor = "000000";options.highlightAlpha = "100";options.fontSize = "large";options.loopPlaylist = "true";options.shufflePlaylist = "true";options.autoLoad = "true";var params = {};params.allowScriptAccess = "always";swfobject.embedSWF("player/swf/OriginalMusicPlayerPlaylist.swf", "player-holder", "250", "250", "9.0.0","expressInstall.swf", options, params, {});</script> 

i tried to use a table-div with the opacity i want but it doesnt work..

Link to comment
Share on other sites

I'm not sure if you can actually set the opacity of a plug-in. Normally you would set the opacity CSS property using Javascript.

element.style.opacity = "0.5";element.style.filter = "alpha(opacity=50)"; // For Internet Explorer

Link to comment
Share on other sites

  • 3 weeks later...

Use the following code.

 HTML: <div id="overlay"></div><div id="content">	<embed src="http://www.w3schools.com/tags/helloworld.swf"  wmode="transparent"></div> CSS:  #overlay {	height: 150px;	width: 300px;	position: absolute;	z-index: 2;	left: 0;	top: 0;	background: black;	opacity: 0.4;	filter:alpha(opacity=40);} #content {	z-index:1;	position: relative;} 

The example is here : http://jsfiddle.net/...u4u4ever/fxz9T/

1. Adjust opacity according to your requirement.2. And also the width/height of the overlay according to the width/height of flash content.3. The overlayed flash is not accesible. If you want to access please hav the opacity option already included in flash (via url parameter).
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...