Your scoping might be wacked>?
have you traced out the getResponse and within it do
somethign like trace(this)= should tell the scope.

try
import mx.utils.Delegate;
> function sendEmail() {
>       lv = new LoadVars();
>       new_lv = new LoadVars();
>       lv.email = email.text;
>       new_lv.onData = Delegate.create(this,getResponse);//Delegate the scope
>       lv.sendAndLoad("emailSubmit.php", new_lv, "POST");
> }
 function getResponse(success) {
trace("HERE IS THE LOAD VARS ITEM"+lv)
>       if (success) {
>               if (lv.status == "ok") {
>                       gotoAndStop(2);
>               } else {
>                       message.text = "Problem";
>               }
>       } else {
>               message.text = "Problem";
>       }
> }


> Is there a reason this works in AS1 and not AS2???????
>
> function sendEmail() {
>       lv = new LoadVars();
>       new_lv = new LoadVars();
>       lv.email = email.text;
>       new_lv.onData = getResponse;
>       lv.sendAndLoad("emailSubmit.php", new_lv, "POST");
> }
> function getResponse(success) {
>       if (success) {
>               if (this.status == "ok") {
>                       gotoAndStop(2);
>               } else {
>                       message.text = "Problem";
>               }
>       } else {
>               message.text = "Problem";
>       }
> }
> stop();
> submit_btn.onRelease = function () {
>       indexOfAt = email.text.indexOf("@");
>       lastIndexOfDot = email.text.lastIndexOf(".");
>       if (indexOfAt != -1 && lastIndexOfDot != -1) {
>               if (lastIndexOfDot < indexOfAt || indexOfAt == 0) {
>                       message.text = "Verify Email";
>               } else {
>                       sendEmail();
>               }
>       } else {
>               message.text = "Correct Email";
>       }
> };
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> 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



_______________________________________________
Flashcoders@chattyfig.figleaf.com
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

Reply via email to