<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http:>
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private function myHandleClick(event:Event):void
{
Alert.show("Clicked!");
}
]]>
</mx:Script>
<mx:Button id="myButton" label="Create Click Event" click="myHandleClick(event)" />
</mx:Application>
Great tutorial!
One problem though, I get the following error when trying example 2:
[RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"]
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()
at mx.rpc::Responder/fault()
at mx.rpc::AsyncRequest/fault()
at DirectHTTPMessageResponder/securityErrorHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/redirectEvent()