Just create any mc, put it in the lib and link it "Button_Main"
HYG
Main Topics
Browse All Topicsthanks for reading, here is the situation.
*** Using AS3 ***
I am creating a new object on the stage via the library and I want to specify it's name via an argument passed to the function.
OUTSIDE of the function, I need to be able to interact with the created object from other sprites, not unusual. The problem I am having is trying to target the new mc, creating it is not the issue.
So I need a simple statement like
newMC.visible = false;
However for some reason I cannot seem to get the target path correct. I've tried eveythig i can think of to no avail.
the code below should be self explanatory.
If you are going to go through the effort to respond, please be sure to test it first.
Thank you!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
No.
Ive tried that.
If I put a trace this in the lib mc I get: this = [object Button_Main]
and this as noted above:
trace(btnName); // output is instance22 (some instance number)
Here perhaps is a better request for this question as I seem to be having problems in descripbing what I want to accomplish.
A. Create a Function that instantiates a linked object (ANY) from the library.
Function needs to create 3 instances with unique names.
names to be used are btnPie, btnCake and BtnBeer - not necessarily in that order :-)
Function goes in frame one of the main timeline
B. In frame two, write a statement that changes the color of instance 1, position of instance 2 and visibility of instance 3.
ie: btnBeer.x = 100; // etc
Business Accounts
Answer for Membership
by: tagitPosted on 2008-06-15 at 02:10:53ID: 21787964
Can you post the class for Button_Main as the name doesn't look to be defined