private function clickEvent(clickEvent:Event):void
{
var buttonName:String = clickEvent.currentTarget.id;
}
In the button call the function(clickEvent(event)) on click event
Flex action scripting, Zend AMF , Audio/Video Player, IBM ILOG Calendar, Cairngorm Framework
Flex RemoteObject property using Action Script
public function searchBooks(srchString:String):void
{
var url:String = "http://localhost/audioData/index.php?srchTxt="+srchString;
var channel:AMFChannel = new AMFChannel("my-amfphp", url);
var channelSet:ChannelSet = new ChannelSet();
channelSet.addChannel(channel);
var ro:RemoteObject = new RemoteObject("amfphp");
ro.channelSet = channelSet;
// Specify the PHP class
ro.source = "AudioBooksData";
ro.showBusyCursor = true;
ro.addEventListener(FaultEvent.FAULT, searchFaultEvent);
ro.addEventListener(ResultEvent.RESULT, searchResultEvent);
ro.getAllDeatils();
}
public function searchResultEvent(e:ResultEvent):void
{
searchResult = e.result;
}
public function searchFaultEvent(e:FaultEvent):void
{
Alert.show(e.toString());
}
{
var url:String = "http://localhost/audioData/index.php?srchTxt="+srchString;
var channel:AMFChannel = new AMFChannel("my-amfphp", url);
var channelSet:ChannelSet = new ChannelSet();
channelSet.addChannel(channel);
var ro:RemoteObject = new RemoteObject("amfphp");
ro.channelSet = channelSet;
// Specify the PHP class
ro.source = "AudioBooksData";
ro.showBusyCursor = true;
ro.addEventListener(FaultEvent.FAULT, searchFaultEvent);
ro.addEventListener(ResultEvent.RESULT, searchResultEvent);
ro.getAllDeatils();
}
public function searchResultEvent(e:ResultEvent):void
{
searchResult = e.result;
}
public function searchFaultEvent(e:FaultEvent):void
{
Alert.show(e.toString());
}
Create sampe application using ZEND AMF and RemoteObject
Please check the following url.
http://www.lonhosford.com/lonblog/2010/08/26/zend-amf-action-message-format-minimalist-example-using-remoteobject-and-mysql/
http://www.lonhosford.com/lonblog/2010/08/26/zend-amf-action-message-format-minimalist-example-using-remoteobject-and-mysql/
Subscribe to:
Posts (Atom)