[Event(name="onSubmit", type="org.pyamf.examples.guestbook.events.SubmitEvent")]
import org.pyamf.examples.guestbook.vo.Message; import org.pyamf.examples.guestbook.events.SubmitEvent;

[Bindable] public var status:String;

public function submitMessage(): void { var message:String = message_txt.text; var name:String = name_txt.text; var msg:Message = new Message( name, url_txt.text, email_txt.text, new Date(), message );

var eventObj:SubmitEvent = new SubmitEvent( msg ); status = "";

if ( message.length > 0 && name.length > 0 ) { this.dispatchEvent( eventObj ); }

message_txt.text = ""; name_txt.text = ""; url_txt.text = ""; email_txt.text = ""; }