Jump to content


Photo

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


  • Please log in to reply
1 reply to this topic

#1 Scotty13

Scotty13

    Member

  • Member
  • PipPipPip
  • 62 posts

Posted 12 July 2011 - 03:38 PM

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
  • 0

#2 Archadian

Archadian

    Member

  • Member
  • PipPipPip
  • 69 posts

Posted 12 July 2011 - 09:42 PM

does it tell you which line? and have you tried to google the error code?

Edited by Archadian, 12 July 2011 - 09:45 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users