Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Change value of Variable in Module

Posted on 2010-08-20
3
Medium Priority
?
423 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 750 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

Industry Leaders: 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

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…
Here in this article, you will get a step by step guidance on how to restore an Exchange database to a recovery database. Get a brief on Recovery Database and how it can be used to restore Exchange database in this section!
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

636 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