django
  • flash
  • 2012-04-09 66 views 0 likes 
    0

    即时通讯工作在与Django后端使用swfobject嵌入swf到视图, Flash游戏然而,当我从InternetExplorer中的Flash(Chrome和Firefox是externalinterface.call()细),则返回nullSWFobject嵌入swf,ExternalInterface.Call返回null

    的Flash游戏本身完美的作品

    Django的视图和嵌入代码:

    <div id="game_container"> 
        <div id='flashContent'></div> 
        </div> 
        <script type="text/javascript" src="swfobject.js"></script> 
        <script type='text/javascript'> 
        var flashvars={{flashvars|safe}}; 
        var params={wmode:"opaque", allowscriptaccess:"always" }; 
        var attributes={id:"flashContent", name:"flashContent"}; 
        swfobject.embedSWF("{{SWF_URL}}", "flashContent", "{{ appsettings.SWF_WIDTH }}", "{{ appsettings.SWF_HEIGHT }}", "10.0.0", false, flashvars, params, attributes); 
    </script> 
    
    
    function fqlearn_isEventInteresting(data) { 
    ln_log(['isEventInteresting',data]); 
    if (!BASE_URL) BASE_URL = data.baseURL; 
    ln_log(['got lesson?',fqlearn_findLearningModule(data) != null]); 
    return fqlearn_findLearningModule(data) != null; 
    //shuld return either true or false. 
    } 
    

    的Flash AS3代码:

    var isInteresting:Object = false; 
    
         try { 
          isInteresting = ExternalInterface.call('fqlearn_isEventInteresting', data); 
         } catch (e:Error) { 
          trace("error calling external interface"); 
          // Container does not support outgoing calls :/ 
          rpc.forceLogUncaughtError("ExternalInterface.call problem", 
           e.name, e.toString(), e.getStackTrace()); 
          rest.apply(restThis); 
          return; 
         } catch (e:SecurityError) { 
          // Security sandbox nonsense :/ 
          throw e; 
         } 
    
         if (isInteresting == null) { 
          // Something went wrong :/ 
          rpc.forceLogUncaughtError("ExternalInterface.call problem", "JS_returned_null_error"); 
         } 
    
         if (isInteresting) { 
          trace("showing learning blackout") 
          dispatch(CoordinationEvent.newLEARNING_ABOUT_TO_SHOW()); 
    
          learningPendingData = { 
           rest: rest, 
           restThis: restThis 
          }; 
    

    来自InternetExplorer中的Flash的ExternalInterface.call()(Chrome和Firefox都可以),它返回null。我该如何解决?

    回答

    0

    修复它:console.debug窒息了Internet Explorer。我删除了这些,它的工作。

    相关问题