Ivan,
I'm etting an error on the "class" says it needs to be
external?
--- Iv <[EMAIL PROTECTED]> wrote:
> Hello stone,
>
> - yes. a little trick needed:
>
> import mx.utils.Delegate;
>
> class EmailForm extends MovieClip {
>
> private var submit_btn:Button;
> private var new_lv : LoadVars;
> private var email : TextField;
> // private var request_url : String =
> "emailSubmit.php";
> private var request_url : String =
> "emailSubmit.txt";
>
>
> private function EmailForm () {
> this.submit_btn.onRelease =
> Delegate.create(this, this.onReleaseHandler);
> }
>
> private function onReleaseHandler() : Void {
> this.sendEmail();
> }
>
> private function sendEmail() : Void {
> trace("sendEmail"+this);
> var lv:LoadVars = new LoadVars();
> this.new_lv = new LoadVars();
> lv["email"] = this.email.text;
> this.new_lv.onData = Delegate.create(this,
> this.getResponse);
> lv.sendAndLoad(this.request_url,
> this.new_lv);
> // , "POST"
> }
>
> private function getResponse
> (loaded_data:String):Void {
> if (loaded_data == null) {
> trace("Error");
> return;
> }
> trace("EmailForm.getResponse("+[arguments]+")");
> // trick
> var lv:LoadVars = new LoadVars();
> lv.onData(loaded_data);
> for (var i : String in lv) {
> trace(i+"="+lv[i]);
> }
> }
>
> }
>
> --
> Ivan Dembicki
>
____________________________________________________________________________
> [EMAIL PROTECTED] |
> | http://www.design.ru
>
> _______________________________________________
> [email protected]
> To change your subscription options or search the
> archive:
>
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam
protection around
http://mail.yahoo.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com