Skip to main content
Known Participant
February 7, 2013
Answered

1120 URLVariables

  • February 7, 2013
  • 1 reply
  • 401 views

Hello All,  I want to connect to Flash to Mysql databse through php to create a login system in Flash. I have set up all the UI components on stage and finished my php file . In my code it appears i am having some URLVariable issues . I copied part of the code from a tutorial and it worked fine. However, when i try to compile it i receive these 4 errors:

Line 33:1120: Access of undefined propert statusTxt.

Line 22:1120: Access of undefined property email.

Line 23:1120 Access of undefined property password.

Line 24:1120 Access of undefined property location.

I initially thought the errors may of been caused because i didnt give my UI components the relevant instance names but when i attempted to change the instance names i get the very same errors.

I show you part of my code below. Its too long to show it in full. If anyone can identify the problem i appreciate it if you can help me. Thanks

import fl.data.DataProvider;

import fl.events.ComponentEvent;

import fl.controls.TextInput;

import fl.controls.ComboBox;

import fl.controls.Button;

//Requesting the php

var phpFileRequest:URLRequest = new URLRequest(domain name);

var phpFileRequest.method = URLRequestMethod.POST;

//Building the variable names

var phpVars:URLVariables = new URLVariables();

//Building the loader

var phpLoader:URLLoader = new URLLoader():

phpLoader.dataFormat =  URLLoaderDataFormat..VARIABLES;

THESE ARE THE ERRORS

phpVars.email = email.text;

phpVars.password = password.text;

phpVars.location = location.text;

phpLoader.load(phpFileRequest);

phpLoader.addEventListener(Event.COMPLETE, showResult);

function showResult(event:Event):void{

(error statusTxt)

statusTxt.text = "" + event.target.data.systemResult;

trace(event.target.data.systemResult);

}

btn_one.addEventListener(MouseEvent.CLICK, btnHandler);

function btnHandler(event:MouseEvent):void {

    trace("Success");

}

This topic has been closed for replies.
Correct answer Ned Murphy

It looks as though you have not named any of your textfields since those errors all relate to the textfields you are trying to target in your code.

1 reply

Ned Murphy
Ned MurphyCorrect answer
Legend
February 7, 2013

It looks as though you have not named any of your textfields since those errors all relate to the textfields you are trying to target in your code.