Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Associating Action Script segment with an object

Posted on 2009-12-25
2
Medium Priority
?
343 Views
Last Modified: 2013-12-17
I have some action script that changes the color of text and I am trying to learn how to link the script with the target object. Can you help me with the steps to do this?
Thank you!
JohnD
0
Comment
Question by:John Darby
2 Comments
 
LVL 14

Accepted Solution

by:
TanLiHao earned 2000 total points
ID: 26123408
I suppose you mean that you want to change the colour of the object containing the text. If so, the recommended way to do it (applies both in AS2 and AS3) is to give the target object an instance name and change it's textColor. If the target object is inside a movieclip or many other objects, then you would need to give the movieclips or buttons above an instance name and then refer to them accordingly.

For example, if the textfield have an instance name of "txt" and the it's in a container movieclip called "container", then you need to set
container.txt.textColor = 0x000000; // this is black, you should change it to a colour you want
0
 
LVL 1

Author Closing Comment

by:John Darby
ID: 31669961
Thank you!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

The main intent of this article is to make you aware of ‘Exchange fail to mount’ error, its effects, causes, and solution.
Steps to fix “Unable to mount database. (hr=0x80004005, ec=1108)”.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Suggested Courses

810 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