Jump to content

Error #1069: Property not found on String and there is no default value.


Recommended Posts

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 objectvar variables:URLVariables = new URLVariables();// Build the varSend variablevar varSend:URLRequest = new URLRequest("scripts/login.php");varSend.method = URLRequestMethod.POST;varSend.data = variables;// Build the varLoader variablevar varLoader:URLLoader = new URLLoader;varLoader.dataFormat = URLLoaderDataFormat.VARIABLES;varLoader.addEventListener(Event.COMPLETE, completeHandler);// Handler for PHP script completion and returnfunction 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("java script:NewWindow=window.location.reload(); NewWindow.focus(); void(0);"); navigateToURL(reloadPage, "_self"); } }// Add an event listener for the submit button and what function to runsubmit_btn.addEventListener(MouseEvent.CLICK, ValidateAndSend);// Validate form fields and send the variables when submit button is clickedfunction 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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...