This content has been marked as final. Show 2 replies
When you create the empty movieclip you can assign it an instance name.
[AS: _level0: Frame 1]
// create an empty movieclip on the stage and give it an
// instance name of foo_mc
// You now have an empty movieclip found at _level0.foo_mc
// attach the movieclip in your library which has the linkage name
// of Bar to your newly created foo_mc and give it an instance
// name of bar_mc
foo_mc.attachMovie("Bar", "bar_mc", foo_mc.getNextHighestDepth());
// You now have an instance of Bar located at _level0.foo_mc.bar_mc
If you are looking to add the linkage name for Bar dynamically you
can't. If a movieclip in your library is not placed on the stage during
design-time or it does not have a linkage name in your library, it won't
be included in the SWF when you publish. It's considered unused and
unused items are left out.
If you were trying to do something else, can you explain a little more.
James O'Reilly - JOR
> I don't believe there is a way but it wouldn't hurt to ask.
> Is there a way to assign a linkage identifier with AS at runtime?
> Meaning I am trying to put a movieclip on the stage, into a new empty
> movieclip dynamically. But the movieclip on the stage does not have a linkage
That is it thanks alot! I wonder why I was trying to make it more complicated then it was?
Your 3D flash is wonderful by the way...I am diving into Flex 2 and AS3 the possibilities are extremely exciting.