Finally got this thing working. Thanks  for those that took the time to
take a look. Seem the hlist being in a state was causing some errors. 
 
Idk if this is an adobe bug, I got the debugger running and the it seems
the horizontal list was getting some errors when it was in a state. I
took it out of that state, populated the hlist with images and hid it.
When I needed the state I added (addChild)  the hlist and made it
visible. 
 
Anthony    
 

________________________________

From: [email protected] [mailto:[email protected]] On Behalf Of Hill,
Anthony J (AT - Atlanta)
Sent: Wednesday, May 13, 2009 1:50 PM
To: [email protected]
Subject: [AFFUG Discuss] horizontal list fun



Hey Group,

 

I'm trying to do a horizontal image list & I've run into a few issues.
The code is paraphrased like:

<mx:Script>

      <![CDATA[

[Bindable] 

 private var imageCollection:ArrayCollection = new ArrayCollection();

 

private var TNAIL_HEIGHT:int = 73;

private var TNAIL_WIDTH:int = 100;

 

 

 

public function getImageObject(source:String):Object{

            return
{type:(source.search("model_info")>=0)?"modelInfo":"Owner",src:source,im
ageWidth:TNAIL_WIDTH,imageHeight:TNAIL_HEIGHT};

       }

 

 

imageCollection.addItem(getImageObject('http://images.autotrader.com/sca
ler/600/300/images/2009/3/21/259/901/10934030151.259901365.IM1.12.565x42
1_A.562x421.jpg'));

imageCollection.addItem(getImageObject('http://images.autotrader.com/sca
ler/600/300/pictures/model_info/media/eVox_AIL/stills_0640/3539/3539_st0
640_041.jpg'));

 

      ]]>

</mx:Script>

 

 

      <mx:Canvas id="tNailholder" horizontalScrollPolicy="on"
verticalScrollPolicy="off" styleName="tNailHolder" width="100%"
height="75" x="0" y="365" >                  

                      <mx:HorizontalList id="tnailTile"
dataProvider="{imageCollection}">

                            <mx:itemRenderer>

                              <mx:Component>                         

                                          <mx:VBox
horizontalAlign="center" height="75" width="75" paddingLeft="10"
backgroundColor="#ff0000" verticalGap="0" borderStyle="solid">

                                           <mx:Image
width="{data.imageWidth}" height="{data.imageHeight}"
source="{data.src}" />

                                          </mx:VBox>

                              </mx:Component>

                           </mx:itemRenderer>                         

            </mx:HorizontalList>

            </mx:Canvas>

 

All this code is in a component, which I'm including in my main
application. 

 

I have a few problems:

1. All the examples I've seen use an external itemRenderer, when I try
to do that I get the error "implicit coercion of value of type Class to
an unrelated type mx.core:IFactory" Any idea what this error is about? I
ended up using a inline itemRenderer which stops the error. 

2. I cant get the images within the Hlist to show anything. Any idea why
images were not showing up? I'm having a hard time even debugging
itemRenderer or the component within. 

 

Any help would be appreciated. 

 

Thanks 

Anthony 


------------------------------------------------------------- 
To unsubscribe from this list, simply email the list with unsubscribe in
the subject line 

For more info, see http://www.affug.com 
Archive @ http://www.mail-archive.com/discussion%40affug.com/ 
List hosted by FusionLink <http://www.fusionlink.com>  
------------------------------------------------------------- 



-------------------------------------------------------------

To unsubscribe from this list, simply email the list with unsubscribe in the 
subject line



For more info, see http://www.affug.com

Archive @ http://www.mail-archive.com/discussion%40affug.com/

List hosted by http://www.fusionlink.com

-------------------------------------------------------------

Reply via email to