Ask questions via twitter! Message any question to @answers on twitter. We'll publish the question and send you a reply each time there's a new answer.
Next Question

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);
}
}
}
Interesting Question?  Yes (0)   No (0)   
RSS
 
 

Best Answer  Chosen by Asker

 
January 02, 2009 10:50 PM
did you convert the buttons to symbols?
Asker's Rating:
• No, I thought that wasn't necessary since I had already created instances of the buttons, but I see now that by converting to a symbol you can reference it from another class. Boy, that's odd.


Helpful Answer?  (0)   (0)    Tip ilaksh for this answer
Permalink | Report
   Reply  
 
 

Answer this Question

How tips and payments work

This question has already been resolved. You may add an answer to it but you will not be eligible to win best answer or any associated tips.

Related Questions

No questions found.

Ask a Question


140 characters left
Top of Page
Buy Mahalo Dollars with Credit Card or PayPal

Top Members

This Week All Time
  • cfinke
    cfinke
    2nd Degree Black Belt
    29661 Points
    M$29.75 Earned
  • bunnyphuph...
    bunnyphuph...
    2nd Degree Black Belt
    22162 Points
    M$803.99 Earned
  • opher
    opher
    Purple Belt with a Brown Tip
    7005 Points
    M$365.37 Earned
   See All
 

Most Popular Tags

mahalo(1852)
music(535)
iphone(497)
google(400)
online(385)
food(371)
money(313)
beer(306)
movies(304)
apple(268)
health(243)
video(239)
aotd(235)
free(233)
dog(219)
travel(218)
   See All
 

Categories

Welcome New Members


 
 
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

 
 

Please log in to use this function.