?
Solved

access of undefined property. What undefined property?

Posted on 2012-03-26
1
Medium Priority
?
339 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses

762 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