Call JavaScript method and pass in parameters : JavaScript « Development « Flex

Home
Flex
1.Chart
2.Components
3.Container
4.Data Model
5.Development
6.Effects
7.Event
8.Graphics
9.Grid
10.Style
Flex » Development » JavaScriptScreenshots 
Call JavaScript method and pass in parameters
Call JavaScript method and pass in parameters
         



<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal">
  <mx:Script>
    
    private var myArray:Array = 'A''B''C' ];
    private function onDoubleClickevent:Event void {
        ExternalInterface.call('itemSelected', theList.selectedIndex, myArray );
    }
    
  </mx:Script>
  <mx:List id="theList" width="300" doubleClick="onDoubleClick(event);" doubleClickEnabled="true"
    dataProvider="{myArray}">
  </mx:List>
</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.Is JavaScript method call ready
4.Call from JavaScript
5.Send to JavaScript
6.Call JavaScript function to get the result
7.Call JavaScript with ExternalInterface
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.