Ok, this is doing my head in, Google hasn’t been my friend, so I am posting here in the hope that some generous soul will solve my problem…
I am using a repeater and a class that extends UIMovieClip. Im using the Flex Component Kit to output an animated button from Flash.
To ensure im sane, first i try it just using the standard mx:Button
<mx:VBox verticalGap="0">
<mx:Repeater id="rp" dataProvider="{this.model.contactDetails.illustratorContactsList}">
<mx:Button label="{IllustratorContactDetails(rp.currentItem).name}"/>
</mx:Repeater>
</mx:VBox>
which works fine. However when i try in one of my Flash compiled Flex Components:
<mx:VBox verticalGap="0">
<mx:Repeater id="rp" dataProvider="{this.model.contactDetails.illustratorContactsList}">
<library:IllustratrorContactButton
dataProvider="{rp.currentItem as IllustratorContactDetails}"/>
</mx:Repeater>
</mx:VBox>
i get the following error:
TypeError: Error #1034: Type Coercion failed: cannot convert IllustratrorContactButton@174070b1 to Array. at mx.flash::UIMovieClip/createReferenceOnParentDocument() [E:\dev\trunk\frameworks\projects\flash-integration\src\mx\flash\UIMovieClip.as:924]
IllustratorContactButton is linked to a custom class that simply extends UIMovieClip and adds basic mousey stuff to it. Im using this approach across the project, and frustratingly sometimes the Repeater works fine, other times not….
Anyone else having issues with using Repeaters with components built using the Flex Component Kit??

Hi,
have you find a solution ? I’ve got the same error with a Repeater. Thanks!
here’s a solution http://gmalartre.blogspot.com/2009/04/turn-uimovieclip-into-irepeaterclient.html
The simplest solution is simply to wrap your Flash-made UIMovieClip component in a Canvas container.
The problem arises when the repeater tries to remove the repeater instance from the stage, it’s expecting to get back an IRepeaterClient interface, and when it doesn’t causes an RTE. So all you have to do is wrap the Flash component in any Flex container that inherits from UIComponent.