Is there any direct way to get SimpleButton asset from the library. Just like how it’s done for a movieclip asset using Assets.getMovieClip() ?
To clarify further, I have a SimpleButton asset in library. Classname is “MyButtonComponent”. So I tried this:
myButton_Sb = cast ( Assets.getMovieClip('MyButtonComponent'), SimpleButton) ;
However, the above lines give a runtime error saying coercion failed when converting from SimpleButton to MovieClip.
PS: It works, if I put the button inside a movieclip, load that movieclip first, and then cast the child button into Simplebutton. But I am looking for some direct way to load it from the library.