flex - how to call java method from actionscript -


i've started working on flex. may basic question i’m not aware of – how can call java method actionscript. want call java method on double click of event. can please let me know how proceed on this?

in flash builder, under data menu, there data service wizards:

data-services

these wizards auto-generate code , convenient connecting wsdl:

wsdl

or http services:

http-service

accessing data services overview has example implementations, such example calling restaurant web service responder returning value objects service.

<?xml version="1.0" encoding="utf-8"?> <s:application xmlns:fx="http://ns.adobe.com/mxml/2009"                xmlns:s="library://ns.adobe.com/flex/spark"                xmlns:mx="library://ns.adobe.com/flex/halo"                xmlns:employeesservice="services.employeesservice.*"                xmlns:valueobjects="valueobjects.*">      <fx:declarations>         <s:webservice id="restaurantsvc"                       wsdl="http://examples.adobe.com/flex3app/restaurant_ws/restaurantws.xml?wsdl" />         <s:callresponder id="getrestaurantsresult"                          result="restaurants = getrestaurantsresult.lastresult restaurant" />     </fx:declarations>      <fx:script>         <![cdata[             import mx.controls.alert;              protected function b1_clickhandler(event:mouseevent):void             {                 getrestaurantsresult.token = restaurantws.getrestaurants();             }         ]]>     </fx:script>      <s:button id="b1"               label="getrestaurants"               click="button_clickhandler(event)" />  </s:application> 

references:


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

html - Building a fluid horizontal navigation -