I have a coin MovieClip which revolves around different orbits in my puzzle game.
Well, my problem is I need to use my
currentCoin
which is a
private var currentCoin:MovieClip
to use the attributes and methods of the DynamicMovie custom as3 class which extends from flash.display.MovieClip
Also, will I be able to add dynamic properties to
private var currentCoin:DynamicMovie
like
mcCurrentCoin["isTravelling"] = true;
after I convert this as a Dynamic Movie?
Thanks,
Vishnu
What @Kodiak says it’s right, MovieClip is a dynamic class, so you can add properties on the fly. You don’t need a custom class to do it. But if you have defined methods for your class, then you do need a custom class.
If your question is HOW to convert a library object to a custom class instead of a movieclip, just right click on it in the library, and in the Export for ActionScript option define as class name “DynamicMovie” and as base class “flash.display.MovieClip”. if your class it’s completely created by code, just let it extend MovieClip.