Solved

Change value of Variable in Module

Posted on 2010-08-20
3
409 Views
Last Modified: 2012-05-10
I have a variable in my module that i need to change the value of from a component.

The variable in the madule looks like this:
[Bindable]
public var vaSec:Boolean = false;

How is this done?
public function txtSecurity_changeHandler(event:TextOperationEvent):void
			{
				if (securityText.text == txtSecurity.text)
				{
					parentApplication.vaSec = true;
				}
				
			}

Open in new window

0
Comment
Question by:kbnordvest
[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
3 Comments
 
LVL 4

Accepted Solution

by:
andreMariano earned 250 total points
ID: 33489897
if its not working like the way you did it, you can cast the parentApplication
for example, if the name of your application is myApp
you will do like this:
public function txtSecurity_changeHandler(event:TextOperationEvent):void
			{
				if (securityText.text == txtSecurity.text)
				{
					myApp(parentApplication).vaSec = true;
				}
				
			}

Open in new window

0
 
LVL 8

Expert Comment

by:IqAndreas
ID: 33492441
Sorry, I don't fully understand what you are trying to do. Do you think you could elaborate a bit more?

Could you give a basic overview of the classes you are using, as well as the relationship of each class, including how the display objects are laid out (child of child etc)


Are you getting any errors from your current code, or is it just not working?
0
 

Author Closing Comment

by:kbnordvest
ID: 33498676
I use the "myApp(parentApplication)". This only gave me access to my main application. I could see variables inside the Module, however i could not change the value of them. I ended up adding the Component code into the Module.
0

Featured Post

Surfing Is Meant To Be Done Outdoors

Featuring its rugged IP67 compliant exterior and delivering broad, fast, and reliable Wi-Fi coverage, the AP322 is the ideal solution for the outdoors. Manage this AP with either a Firebox as a gateway controller, or with the Wi-Fi Cloud for an expanded set of management features

Question has a verified solution.

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

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
Facebook has became the #1 social media platform. People share many funny videos there, yet you don't know how to download them? Now you can download Videos from Facebook in just 3 simple steps.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

735 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