# Flash CS4: Had 7 errors now 2 - HELP!

**URL:** <https://forum.kirupa.com/t/flash-cs4-had-7-errors-now-2-help/322142>\
**Category:** flash\
**Created:** [May 11, 2011, 9:45pm UTC](https://forum.kirupa.com/t/flash-cs4-had-7-errors-now-2-help/322142 "2011-05-11T21:45:30Z")\
**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:** [May 11, 2011, 9:45pm UTC](https://forum.kirupa.com/t/flash-cs4-had-7-errors-now-2-help/322142/1 "2011-05-11T21:45:30Z")

</div>

Working with Flash CS4 - and a Newbie to actionscript.  
Heres my Compiler Errors…. (description & source)

1. Description…  
1120: Access of undefined property locator\_txt.  
Go to source…  
variables.loca = locator\_txt.text;

* * *

1. Description…  
Warning: 3596: Duplicate variable definition.  
Go to source…  
var varLoader\_re:URLLoader = new URLLoader;

* * *

stop();  
//email\_txt.tabIndex = 1;  
//locator\_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(“[http://www.myglobalpnr.com/scripts/ckin.php](http://www.myglobalpnr.com/scripts/ckin.php)”);  
varSend.method = URLRequestMethod.POST;  
varSend.data = variables;  
// Build the varLoader variable  
var varLoader\_re: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 reservation was found 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(!locator\_txt.length) {  
status\_txt.text = “Please enter your locator.”;  
} else {

// Ready the variables for sending  
variables.email = email\_txt.text;  
variables.loca = locator\_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 //////////////////////////////////////////////////////////////  
Thanks in advance,  
Scotty13:hair:
