How can we add a UIComponent (mx controller) into a movieclip. I am using FLEX 4 (Flash Builder 4)?
I have <mx:UIComponent> in a mxml file. The UIComponent is basically a Youtube player with all the controls. I am using this UIComponent in a class UPlayer that extends Skinnable Component. (Public class Player extends SkinnableComponent).
In the main application I am using a Vgroup to add this Youtube Player. But what I actually want to do it to add this YoutubePlayer inside a MovieClip. Whenever I am trying to add this to movieclip - it throws an error that says "
Implicit coercion of a value of type flash.display:MovieClip to an unrelated type mx.core:IVisualElement."
Could somebody let me know how I add this player to a MovieClip. The application requirement is such - I need to add it to a movieclip. Thanks in advance.
Might be possible if you use UIMovieClip.
Thank you for your response, but using UIMovieClip did not help. I tried a different approach and it worked. Here is what I did:
I am suprised how this worked: It was a basic and simple thing (that I re-did 'again'): Used it as a new mxml component and included this new component in the main application. When I tried this approach earlier (before I posted on the forum) it was throwing some similar errors. But when I tried it again (just for the sake of it)..it worked!
I have no clue why and how this happened.
Sorry for the late reply.