Is JavaScript method call ready : JavaScript « Development « Flex






Is JavaScript method call ready

         
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    backgroundColor="#FFFFFF" creationComplete="initApp();"
    width="350" height="300">
  <mx:Script>
  import mx.controls.Alert;
  import flash.external.ExternalInterface;
  private function initApp():void{
    if(ExternalInterface.call("isJSReady")){
        mx.controls.Alert.show("JavaScript is Ready");
    } 
  }

  </mx:Script>
</mx:Application>

   
    
    
    
    
    
    
    
    
  








Related examples in the same category

1. block calls the JavaScript changeDocumentTitle() function in the enclosing wrapper by using the call() method<fx:Script> block calls the JavaScript changeDocumentTitle() function in the enclosing wrapper by using the call() method
2.If you pass an object, you can access the properties of that deserialized object in the JavaScriptIf you pass an object, you can access the properties of that deserialized object in the JavaScript
3.Call from JavaScript
4.Send to JavaScript
5.Call JavaScript function to get the result
6.Call JavaScript with ExternalInterface
7.Call JavaScript method and pass in parametersCall JavaScript method and pass in parameters