I have a simple flex3 project with and mxml file (with some as inside of it) and FMSConnection.as
I have something like this
public class FMSConnection extends NetConnection
{
//this methods is called from the media server
public function Message(message:String):void
{
//how to display (add it to a textarea) this message, when this method is invoked ?
}
}
Instead of declaring the
lastMessagevariable, you can dispatch a custom event and store the message in it if you want to.Overriding the
clonemethod is not necessary in this case, but it’s a good practice to follow while using custom events. If you don’t override the clone method, you will get a runtime error while trying to redispatch the custom event from the event handler.