0
votes

I am attempting to create a Spark DropDownList that supports images. I found this tutorial:

http://blog.flexexamples.com/2009/04/14/displaying-images-in-a-spark-dropdownlist-control-in-flex-gumbo/

However, I am working in AS3, not MXML, so I've had to make a few adaptations. The only item left that I cannot seem to get to work is this line:

itemRenderer="spark.skins.spark.DefaultComplexItemRenderer"

When I use DropDownList.itemRenderer = spark.skins.spark.DefaultComplexItemRenderer, I get the following error:

Implicit coercion of a value of type spark.skins.spark:DefaultComplexItemRenderer to an unrelated type mx.core:IFactory

And, of course, there is nothing in mx.core that seems to match-up.

1

1 Answers

2
votes

have you tried type casting it to type ClassFactory like:

itemRenderer = new ClassFactory(spark.skins.spark.DefaultComplexItemRenderer);