Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

1120 URLVariables

Community Beginner ,
Feb 07, 2013 Feb 07, 2013

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");

}

TOPICS
ActionScript
386
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Feb 07, 2013 Feb 07, 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.

Translate
LEGEND ,
Feb 07, 2013 Feb 07, 2013
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines