Re: [flexcoders] please help itemrenderer accessing
On Thursday 06 Sep 2007, [EMAIL PROTECTED] wrote: ItemRenderers are tricky because they are recycled. Even resizing the internal image might cause a reĀrenderer and change which renderer is displaying the image. Once you know the way to do things, it's very easy though (like most Flexy things). In this case, create an (override) 'set data' method, and make sure that (re)sets up your renderer when ever it's called based on the argument which will be an item from the dataProvider. -- Tom Chiverton Helping to dramatically disintermediate guinine e-markets on: http://thefalken.livejournal.com This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at St James's Court Brown Street Manchester M2 2JF. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law Society. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 8008. For more information about Halliwells LLP visit www.halliwells.com. -- 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 * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] please help itemrenderer accessing
Hi everyone, // *newbie alert* I have a tilelist control in my main.mxml that has an itemrenderer called thumbnail. within thumbnail.mxml there is a image control. what I want to do is from actionscript in main.mxml is resize(using a slider) the image in the itemrenderer from main.mxml. if your confused here is an clip from the files main.mxml: mx:Script ![CDATA[ private function sliderChange(event:SliderEvent):void { do the stuff. } ]] mx:HSlider change=sliderChange(event)/ .. mx:TileList id=myHList itemRenderer=Thumbnail .. thumbnail.mxml: mx:Image id=thimage source={data.attribute('src')} .. The dataprovder is xml using e4x. which is reading photos from xml and displaying them. that is working but I would like to resize the thumbnails using a slider but all I can seem to do is resize the tilelist control. which I don't think is right way to do it. even if nobody knows how to do this (which I'm sure is not the case from what I've seen on this forum) how do I get access to the itemrenderer controls at all? using actionscript 3 and flexbuilder 2 please and thank you for any help
RE: [flexcoders] please help itemrenderer accessing
ItemRenderers are tricky because they are recycled. Even resizing the internal image might cause a re-renderer and change which renderer is displaying the image. I'd write my Renderers to pull from external data sources such as the data in the dataprovider, or if you have to, some extrnal property that is tweaked by the Slider. IOW, the slider could alter properties in the same dp item that a renderer is watching, or the renderers could know to look for an imageSize prop on the application. -Alex From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of asdrt234234 Sent: Wednesday, September 05, 2007 2:56 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] please help itemrenderer accessing Hi everyone, // *newbie alert* I have a tilelist control in my main.mxml that has an itemrenderer called thumbnail. within thumbnail.mxml there is a image control. what I want to do is from actionscript in main.mxml is resize(using a slider) the image in the itemrenderer from main.mxml. if your confused here is an clip from the files main.mxml: mx:Script ![CDATA[ private function sliderChange(event:SliderEvent):void { do the stuff. } ]] mx:HSlider change=sliderChange(event)/ .. mx:TileList id=myHList itemRenderer=Thumbnail .. thumbnail.mxml: mx:Image id=thimage source={data.attribute('src')} .. The dataprovder is xml using e4x. which is reading photos from xml and displaying them. that is working but I would like to resize the thumbnails using a slider but all I can seem to do is resize the tilelist control. which I don't think is right way to do it. even if nobody knows how to do this (which I'm sure is not the case from what I've seen on this forum) how do I get access to the itemrenderer controls at all? using actionscript 3 and flexbuilder 2 please and thank you for any help