That should be easy enough.

In the CustomDragProxy class add a variable declaration defined as
type Class and embed the image/icon you want to use.

[Embed(source='user.png')]
public var IconCls:Class;

Then in the createChildren method, replace the loader code with this

var icon:Bitmap = new IconCls();
container.addChild(icon);

That should do it. The only caveat is that the code above can't load
different icons for different selected rows since you are using a
class value declared in the drag proxy. If you need to change the
icon, based on the row selected you would need to create a switch in
the CustomDragProxy class to check some value in the item (row) and
then use the appropriate icon class. There are some other options
available to, but the switch is likely the easiest unless you need a
great deal of flexibility in the icon to load.

Hope that helps.

Derrick
--------------
Derrick Grigg
www.dgrigg.com

Reply via email to