In order to change the image source dynamically instead of creating multiple image instances, we could make use of [Embed] tag as follows:
[Embed(source="a.png")]
private var _src_a:Class;
[Embed(source="b.png")]
private var _src_b:Class;
_img = new Image ();
if ( … ) {
_img.source = _src_a;
} else {
_img.source = _src_b;
}
thank you!!!!!!!
You are welcome