lakor03
07-27-2009, 11:56 AM
Hi here is a quick problem I'm struggeling with:
how do I update/redraw an image from AS
I have created an image in mxml, changed the source, but I guess I somehow need to redraw it so see the change?
<mx:AddChild relativeTo="{myPlayArea}" position="lastChild">
<mx:Image x="0" y="0" width="242" height="484" id="levelImage" source="{imgCls}"/>
</mx:AddChild>
in AS I do something like:
[Embed(source="../assets/img1.jpg")][Bindable]public var imgCls1:Class;
[Embed(source="../assets/img2.jpg")][Bindable]public var imgCls2:Class;
and then
imgCls1 = imgCls2
thanks in advance
how do I update/redraw an image from AS
I have created an image in mxml, changed the source, but I guess I somehow need to redraw it so see the change?
<mx:AddChild relativeTo="{myPlayArea}" position="lastChild">
<mx:Image x="0" y="0" width="242" height="484" id="levelImage" source="{imgCls}"/>
</mx:AddChild>
in AS I do something like:
[Embed(source="../assets/img1.jpg")][Bindable]public var imgCls1:Class;
[Embed(source="../assets/img2.jpg")][Bindable]public var imgCls2:Class;
and then
imgCls1 = imgCls2
thanks in advance