Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

refresh image in itemrenderer

Avatar

Avatar
Level 1
BlueVeinz
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
BlueVeinz
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
BlueVeinz
Level 1

25-03-2009

Hello,



I'm populating my tilelist with an itemrenderer. In this
itemrenderer I'm having an image and textbox. The textbox is
bindable, but my image isn't, because it's getting his source using
the image.load method. Is there any way I can refresh my image when
the datasource of the tilelist changes? (the textfield changes
properly).

Here's some examplecode.



private function init():void {

base64Dec = new Base64Decoder();

base64Dec.decode(data.comiccover); //used to decode the
incoming url

byteArr = base64Dec.toByteArray();

img.load(byteArr);

}



<mx:Image width="100" id="img" />

<mx:Text text="{data.title}" id="txtTitle" />



Replies

Avatar

Avatar
Boost 5
Level 3
Greg_Lafrance
Level 3

Likes

15 likes

Total Posts

71 posts

Correct Reply

5 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Applaud 5
View profile

Avatar
Boost 5
Level 3
Greg_Lafrance
Level 3

Likes

15 likes

Total Posts

71 posts

Correct Reply

5 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Applaud 5
View profile
Greg_Lafrance
Level 3

01-04-2009

You might be able to add a collectionChange event listener to
the TileList dataProvider collection, and have that listener call
the function to reload the image.