PDA

View Full Version : Swf player not clickable in safari


jvvnmurty
08-21-2008, 07:07 AM
Hi All,

I am trying to build an application where I need to display an audio player and video player.It is working fine in IE7 but having issues with firefox and Safari

Firefox issues:The player is clickable and working but when I do mouseover over the player it disintegrates and some times only apart of the player is visible.

Safari Issues:The player is visible but it is not clickable,I am able to see only the image of the swf player.
So please Help me out to have a solution for this
Here Is my code snippet:

<canvas height="300" width="300">
<script>
var nodecount=0;
var j=0;
</script>
<dataset id="dset" name="dset" src="xmls/video.xml" request="true"/>
<view height="300" width="300" layout="axis:x" bgcolor="red">
<text datapath="dset:/response/nodecount/text()" visible="false">
<handler name="ontext">
nodecount++;
Debug.write("count=="+nodecount);
</handler>
</text>
<text fontsize="16" fontstyle="bold">&lt;
<handler name="onclick">
<![CDATA[
j--;
if(j>=0)
{
var exhtmlurl="<embed id='audioplayer1' class='onePixPlayer' width='239' height='140' flashvars='soundFile=http://content-ind.cricinfo.com/db/MULTIMEDIA/900/928.1.mp3&playerID=1' type='application/x-shockwave-flash' src=player.swf' name='audioplayer1' bgcolor='#FFFFFF' quality='high' wmode='transparent' menu='false'/>";
test3.setSrc('Ex.html?url='+exhtmlurl);
}
]]>
</handler>
</text>

<view bgcolor="red" height="150" width="150" visible="false" id="mp3">
<html id="test3" name="test3" history="false" height="200" width="200">
<method name="oninit">
this.bringToFront();
</method>
</html>
</view>
<text fontsize="16" fontstyle="bold">&gt;
<handler name="onclick">
<![CDATA[
j++;
Debug.write("j==="+j+"?"+nodecount);
if(j<=nodecount)
{
if(j%2==0)
{
Debug.write("j==="+j);
var url="<embed id='audioplayer1' width='239' height='140' type='application/x-shockwave-flash' src='player.swf?soundFile=http://content-ind.cricinfo.com/db/MULTIMEDIA/900/928.1.mp3&playerID=1' name='audioplayer1' bgcolor='black' quality='high' wmode='transparent' allowfullscreen='true'/>";
test3.setSrc('Ex.html?url='+url);
}else
{
var url="<object width='180' height='130'><param name='movie' value='http://www.youtube.com/v/przTKHLoD8Y&hl=en&fs=1'></param><param name='allowFullScreen' value='true'></param><embed src='http://www.youtube.com/v/przTKHLoD8Y&hl=en&fs=1' type='application/x-shockwave-flash' allowfullscreen='true' width='180' height='130'></embed></object>";
test3.setSrc('Ex.html?url='+url);
}
}
]]>
</handler>
</text>
</view>
</canvas>


below is the html code:-

<div id="flcontainer">

</div>
<script language="Javascript">

var str = document.URL.substring(document.URL.indexOf('=')+1 ,document.URL.length);
var str=str.split("%3C").join("<");
var str=str.split("%3E").join(">");
var str=str.split("%20").join(" ");

alert("str==="+str);
var tmp;
tmp=eval('document.all.flcontainer');
tmp.innerHTML=str;

</script>

below is the xml for the dataset

<response>
<nodecount>1</nodecount>
<nodecount>2</nodecount>
<nodecount>3</nodecount>
<nodecount>4</nodecount>
<nodecount>5</nodecount>
</response>

Thanks in advance.
Murthy

rcyeager
08-21-2008, 07:17 AM
Sounds like a wmode issue with the swf embed.

I use "opaque" for non-IE browsers, "window" for IE.

Robert Yeager
http://www.qrowd.com
http://www.cooqy.com