This content has been marked as final. Show 3 replies
>> Now I also gave it a a class name
ItemMC and exported for action script. But it is giving me this error.
ReferenceError: Error #1065: Variable ItemMC is not defined.
while doing this
var item_mc:MovieClip = new ItemMC();
When you give a MC a class name in the linkage properties you are not making
that MC a class that you can instance using new. That is for defining a
custom class that you wrote which can extend the MovieClip class.
Adobe Community Expert
Well that code work for another component whose code was part of that graphical asset file. It is actually a custom class for a movie clip, and I instantiate some other movie clip from the library.
Anyways, is there any other way as well for instantiating something from library?
I am still not able to instantiate anything from controller that was part of graphical assetts file.
Can anyone please answer with a better solution. I dont want to write any custom classes at all for graphical assets. All the code should be in the controller, not graphical assetts.