i m trying to load image in TileList using "itemrenderer" and "dataprovider" but there's some error which i m not able to sort.

i m pasting the code below.

 

//////////////////////////////

<?xml version="1.0" encoding="utf-8"?>

<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" height="100%" width="100%" creationComplete="initCellEditor(event);">

<mx:Script>

<![CDATA[

import flash.events.Event;

import mx.core.ClassFactory;

import mx.controls.listClasses.*;

import mx.controls.Image;

[Bindable]

public var myArr:Array = [

{image:"assets/images/inetoo_bg.jpg"},

{image:"assets/images/inetoo_bg.jpg"}

];

public function initCellEditor(event:Event):void {

thumbnail.itemRenderer= new ClassFactory(RendererState);

}

]]>

</mx:Script>

<mx:HBox label="Navigation">

<mx:Button label="btn1"/>

<mx:Button label="btn2"/>

<mx:Button label="btn3"/>

</mx:HBox>

<mx:HBox width="100%" id="mainHB">

<mx:TileList id="thumbnail" dataProvider="{myArr}" columnCount="1" width="100%" itemRenderer="renderer/imagecomp"/>

</mx:HBox>

</mx:VBox>

/////////////////////////

"imagecomp" is as below;

///////////////////////////////////////

<?xml version="1.0" encoding="utf-8"?>

<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" horizontalAlign="center" verticalAlign="top">

<mx:Image id="image" width="60" height="60" source="{data.image}"/>

</mx:VBox>

////////////////////

 

The error i m getting is: initializer for 'itemRenderer': cannot parse value of type mx.core.IFactory from text 'renderer/imagecomp'



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to