swf无法在Internet Explorer中工作

时间:2011-01-03 13:15:12

标签: flex actionscript-3 flash mxml mxmlc

为什么以下代码无法在IE.IS上运行,我在这里遗漏了什么。请让我知道

<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
width="300"
height="100"
creationComplete="init()">

<mx:Script>
  <![CDATA[
     import mx.controls.Alert;
     import flash.net.NetStream;

     private var myMic:Microphone;


     private function init():void {

        Mic = Microphone.getMicrophone();
        Mic.setSilenceLevel(0);
        Mic.rate = 44;
        Mic.gain = 100;
        Security.showSettings(SecurityPanel.MICROPHONE);
        myMic.setLoopBack(true);

     }

  ]]>
 </mx:Script>

 <mx:ProgressBar x="0" y="36" mode="manual" id="micLevel" label="" labelPlacement="bottom" width="100" fontSize="10" fontWeight="normal"/>


 </mx:Application>

1 个答案:

答案 0 :(得分:2)

好吧,ima flex开发人员,我们的PHP开发人员通常会考虑这个问题,但我确实有一些想法,有两个对象标签写在我的html文件中,一个用于IE浏览器,另一个用于其他浏览器,如下所示: / p>

 <body>
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"    id="index" width="970" height="530"    codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">    <param name="movie" value="http://abc.com/createYourOwnV2.swf" />    <param name="quality" value="high" />    <param name="bgcolor" value="#ffffff" />    <param name="allowScriptAccess" value="sameDomain" />    <param name="FlashVars" value="typeId=<?PHP echo $typeId?>&designId=<?PHP echo $designId?>&productId=<?PHP echo $productId?>"/>    <embed src="http://abc.com/createYourOwnV2.swf" quality="high" bgcolor="#ffffff"
        width="970" height="530" name="index" align="middle"
        play="true"
        loop="false"
        quality="high"
        FlashVars="typeId=<?PHP echo $typeId?>&designId=<?PHP echo $designId?>&productId=<?PHP echo $productId?>"
        allowScriptAccess="sameDomain"
        type="application/x-shockwave-flash"
        pluginspage="http://www.adobe.com/go/getflashplayer">    

    </embed>  </object> </body>

希望它有所帮助,ankur