我需要闪光灯交谈jQuery的。
下面是我的Flash code:
如果(ExternalInterface.available)
{
ExternalInterface.call('函数(){MyFunction的();}');
ExternalInterface.call('函数(){警报(赞美耶稣!);}');
}
警报的伟大工程。我的功能没有。
下面是我的jQuery的:
<脚本类型=文/ JavaScript的>
$(文件)。就绪(函数()
{
$(#flashContentABOVE)点击(MyFunction的);
功能MyFunction的()
{
$(#flashContentABOVE)的CSS(z索引,4);
}
});
< / SCRIPT>
解决方案
把你的<脚本>
在HTML文件的底部(结束<身体GT; ),并采取了的document.ready()
功能
I need flash to talk to jQuery.
Here is my Flash code:
if (ExternalInterface.available)
{
ExternalInterface.call('function(){ MyFunction(); }');
ExternalInterface.call('function(){ alert("Praise Be Jesus Christ!"); }');
}
The "Alert" works great. My function does not.
Here is my jQuery:
<script type="text/javascript">
$(document).ready(function()
{
$("#flashContentABOVE").click(MyFunction);
function MyFunction()
{
$("#flashContentABOVE").css("z-index", 4 );
}
});
</script>
解决方案
Put your <script>
tag at the bottom of your html file (before the closing <body>
), and take out the document.ready()
function.
上一篇:从Flash影片传送位图的Javascript位图、影片、Flash、Javascript
下一篇:如何prevent Event.Resize触发两次的displayState变化FULL_SCREEN?两次、Event、prevent、Resize