2012-04-09 14 views
0

swfobjectを使用してswfをビューに埋め込むdjangoバックエンドのフラッシュゲームに取り組んでいます しかし、InternetExplorerのFlashからexternalinterface.call()を実行すると(ChromeとFirefoxはSWFObject埋め込みswf、ExternalInterface.Callはnullを返す

<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. 
} 

フラッシュAS3コード:

)罰金、それはヌル

フラッシュゲーム自体が完全

Djangoのビューや埋め込みコードを返し作品

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(ChromeとFirefoxは正常です)のFlashのExternalInterface.call()はnullを返します。どのように私はこれを修正するのですか?

答えて

0

修正済み:console.debugがInternet Explorerを窒息させていた。私はそれらを削除し、それは働いた。

関連する問題