Tech or Treat! Write an article about your scariest tech disaster to win gadgets!Learn more

x
?
Solved

access of undefined property. What undefined property?

Posted on 2012-03-26
1
Medium Priority
?
342 Views
Last Modified: 2012-03-26
access of undefined property variable01.
access of undefined property pattern.
I don't see a problem with the code, yet the error persists. I am using Flex Builder.

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx"
               creationComplete="init(event);"
               minWidth="955" minHeight="600" backgroundColor="#cbd8e6">
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <fx:Script>
        <![CDATA[
        var variable01:String;
        variable01 = "1";

        var pattern:RegExp;
        pattern = /^[0-9]{1,3}$/;

        pattern.test(variable01);
        ]]>
    </fx:Script>
</s:Application>
0
Comment
Question by:kadin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
kadin earned 0 total points
ID: 37768591
I have learned from other sources the open variables variable01 and pattern must reside within an event handler like creationComplete="init(event);" .

public function init():void{                
                var variable01:String;
                variable01 = "1";
                var pattern:RegExp;
                pattern = /^[0-9]{1,3}$/;
                trace(pattern.test(variable01));
            }
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question