Jump to content
Scotty13

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

Share this post


Link to post
Share on other sites

The error is telling you that there is no "return_msg" property on event.target.data because event.target.data is a string.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...