Check for ExternalInterface before adding the callback
authorAndy Allan <andy@gravitystorm.co.uk>
Sat, 24 Mar 2012 18:04:47 +0000 (18:04 +0000)
committerAndy Allan <andy@gravitystorm.co.uk>
Sat, 24 Mar 2012 18:04:47 +0000 (18:04 +0000)
net/systemeD/potlatch2/save/OAuthPanel.mxml

index f345701..2e629a8 100644 (file)
             var urlStr:Object = oauthRequest.buildRequest(sig, OAuthRequest.RESULT_TYPE_URL_STRING)
 
                        //register the "pressTry" function so the oAuth callback page can try to advance the editor directly to the next step
-                       ExternalInterface.addCallback("pressTry", pressTry);            
+            if (ExternalInterface.available) {
+                ExternalInterface.addCallback("pressTry", pressTry);
+            }
                        
             // build the actual request
             var urlReq:URLRequest = new URLRequest(String(urlStr));