hi, I want to display a png with flex's builtin image component.
There's a specific x, y that I want this image to be displayed.
How do I do it? I am pretty new to flex.
hi, I want to display a png with flex's builtin image component.
There's a specific x, y that I want this image to be displayed.
How do I do it? I am pretty new to flex.
This is easy. See the online Adobe documentation on positioning.
<mx:Image id="img0"
source="@Embed('logo.jpg')"
x="40" y="40"/>
Of course you can choose not to Embed the image and load it directly from a different URL. I strongly recommend going through the API documentation.
And always refer to the documentation: ImageControl
Edit: Using the Image control in AS3 code
import mx.controls.Image;
public function SetImageProperties(url:string, x:int, y:int) : void {
var imageLoader:Loader = new Loader();
var image:URLRequest = new URLRequest(url);
imageLoader.load(image);
addChild (imageLoader);
imageLoader.x = x;
imageLoader.y = y;
}
Use a loop/Repeater
component for multiple images.