Next Question
RSS
Answered Question
M$1
January 02, 2009 10:47 PM
FLASH AS3: How do I reference an instance on the stage from an ActionScript file?
I have created 4 radio buttons on the stage, each with a different name.
How do I reference these from an external .as file?
I get:
1120: Access of undefined property Radio1.
1120: Access of undefined property MouseEvent.
I have:
package
{
public class Setup
{
public static var Shown:Boolean = false;
function ShowFinished() {
trace ("Got here.");
}
public function Setup() {
Radio1.addEventListener(MouseEvent.CLICK, ShowFinished);
}
}
}
How do I reference these from an external .as file?
I get:
1120: Access of undefined property Radio1.
1120: Access of undefined property MouseEvent.
I have:
package
{
public class Setup
{
public static var Shown:Boolean = false;
function ShowFinished() {
trace ("Got here.");
}
public function Setup() {
Radio1.addEventListener(MouseEvent.CLICK, ShowFinished);
}
}
}
Interesting Question?
Yes (0)
No (0)
- In Web Development |
- |
- Report |
-
Share
RSS
Best Answer Chosen by Asker
Answer this Question
Related Questions
No questions found.
Ask a Question
Buy Mahalo Dollars with Credit Card or PayPal
Top Members
Most Popular Tags
Categories
- Anonymous
- Arts & Design
- Beauty & Style
- Books & Authors
- Business
- Cars & Transportation
- Consumer Electronics
- Coupons Deals
- Education
- Entertainment
- Environment
- Fitness
- Food & Drink
- From Email
- From Iphone
- From Twitter
- Health
- History
- Hobbies
- Home & Garden
- How Tos
- Humor
- Jobs
- Legal
- Local
- Love & Relationships
- Mahalo Answers Community
- Money
- Music
- News
- NSFW
- Parenting
- Pets
- Science & Mathematics
- Services
- Shopping
- Social Science
- Society & Culture
- Sports
- Technology & Internet
- Travel
- Video Games
Welcome New Members
- sandrasanya, December 17, 2009 09:43 PM
- buddha2333, December 17, 2009 09:36 PM
- ricklogan, December 17, 2009 09:33 PM
- markbit, December 17, 2009 09:30 PM
- luilui, December 17, 2009 09:20 PM
Mahalo Dollars are the currency of Mahalo Answers.
Each Mahalo Dollar costs $1.
Once you earn more than 40 Mahalo Dollars, you can request to be paid via PayPal. Each Mahalo Dollar is currently worth $0.75 when paid out via PayPal. Learn More