# Error #1069: Property return\_msg not found on String and there is no default value

**URL:** <https://forum.kirupa.com/t/error-1069-property-return-msg-not-found-on-string-and-there-is-no-default-value/323689>\
**Category:** Uncategorized\
**Created:** [July 12, 2011, 8:05pm UTC](https://forum.kirupa.com/t/error-1069-property-return-msg-not-found-on-string-and-there-is-no-default-value/323689 "2011-07-12T20:05:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Scotty13](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@Scotty13](https://forum.kirupa.com/u/Scotty13)\
**Post date:** [July 12, 2011, 8:05pm UTC](https://forum.kirupa.com/t/error-1069-property-return-msg-not-found-on-string-and-there-is-no-default-value/323689/1 "2011-07-12T20:05:16Z")

</div>

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](http://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
