Scotty13 Posted July 12, 2011 Report Share Posted July 12, 2011 I’m a newbie to all this and I need HELP! I teaching myself php & flash cs4. Here’s my FLASH CS4 script error… ReferenceError: Error #1069: Property return_msg not found on String and there is no default value. at header_fla::MainTimeline/completeHandler1() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete() Here’s my script… stop(); //email_txt.tabIndex = 1; //password_txt.tabIndex = 2; //sumbit_btn.tabIndex = 3; //////////// // Assign a variable name for our URLVariables object var variables:URLVariables = new URLVariables(); // Build the varSend variable var varSend:URLRequest = new URLRequest("scripts/login.php"); varSend.method = URLRequestMethod.POST; varSend.data = variables; // Build the varLoader variable var varLoader:URLLoader = new URLLoader; varLoader.dataFormat = URLLoaderDataFormat.VARIABLES; varLoader.addEventListener(Event.COMPLETE, completeHandler); // Handler for PHP script completion and return function completeHandler(event:Event):void{ status_txt.text =""; if (event.target.data.return_msg == "no_good") { status_txt.text = "No match in our records, please try again"; } else if (event.target.data.return_msg == "all_good") { var reloadPage:URLRequest = new URLRequest("javascript:NewWindow=window.location.reload(); NewWindow.focus(); void(0);"); navigateToURL(reloadPage, "_self"); } } // Add an event listener for the submit button and what function to run submit_btn.addEventListener(MouseEvent.CLICK, ValidateAndSend); // Validate form fields and send the variables when submit button is clicked function ValidateAndSend(event:MouseEvent):void{ // "Remember Me" addition code for the checkbox variable------------ var rememberChoice:String; ////////////////// remember me variable setup///////////// if (rememberCheckbox.currentFrame == 2) { rememberChoice = "yes"; } else { rememberChoice = "no"; } // End "Remember Me" addition code for the checkbox variable------- status_txt.text =""; //validate form fields if(!email_txt.length) { status_txt.text = "Please enter your email address."; } else if(!password_txt.length) { status_txt.text = "Please enter your password."; } else { // Ready the variables for sending variables.email = email_txt.text; variables.pass = password_txt.text; variables.remember = rememberChoice; // Added for Remember me checkbox // Send the data to the php file varLoader.load(varSend); status_txt.text = "Processing..."; } // close else after form validation } // Close ValidateAndSend function ////////////////////////////////////////////////////////////// Where is my error - Flash or PHP? Thanks in advance, Scotty Quote Link to comment Share on other sites More sharing options...
Archadian28 Posted July 13, 2011 Report Share Posted July 13, 2011 (edited) does it tell you which line? and have you tried to google the error code? Edited July 13, 2011 by Archadian Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.