Accessing children of loaded swf in Flex Image component
Posted
by pfunc
on Stack Overflow
See other posts from Stack Overflow
or by pfunc
Published on 2010-03-15T19:05:47Z
Indexed on
2010/03/15
19:09 UTC
Read the original article
Hit count: 205
I am loading an external swf into an component. It loads everything fine and I can see buttons working in the swf, but I can't seem to figure out how to add children to this swf from the core mxml file. I have tried tracing out all the children of the image component but can't find where or how to do this.
This is the image component:
<Image id="image" mask="{ maskCanvas }" source="{ _source }" mouseDown="image.startDrag()" visible="{ _source != null && image.percentLoaded == 100 }"
showEffect="{ fadeInEffect }" complete="imageComplete()" doubleClickEnabled="true" doubleClick="onDoubleClick()" />
And in my AS, I am trying to do something like this:
myComponent.image.addChild("myMC");
But i either don;t see the clip or there I get an error about not being able to add the child to a ui component.
© Stack Overflow or respective owner