I have a component, that has a property of type Image. I need to assign
a new Image component to it. this is trivial to do in action script.
But, how do I do it in MXML?
Example:
mxml:
<local:myContainerComponent id="containerComponent"/>
actionscript:
var myImage:Image = new Image("myTestImage.jpg");
containerComponent.imageVar = myImage;
Is there anyway to do that creation of the image, and assignment purely
from MXML? The image cant be a child of anything else, so I cant just
declare it randomly somewhere in the same container.
For context, im using the Flash Component Kit, and the
myContainerComponent is a container exported from flash a
"mx.flash.ContainerMovieClip". And it requires you to assign a component
to its "content" property. Ideally, id like to create and assign this
content component using mxml only.