extends FeathersControl › MeasureSprite › ValidatingSprite
Loads and displays an asset using either OpenFL's asset management system or from a URL.
Supports assets of the following types:
scaleMode:StageScaleMode = StageScaleMode.SHOW_ALL
The following example maintains the aspect ratio of the asset, but displays no border, and may crop it to fit:
loader.scaleMode = StageScaleMode.NO_BORDER
Sets the loader's source, which may be either the name of an asset or a URL to load the asset from the web instead.
The following example sets the source to an asset name:
loader.source = "my-asset-name";
The following example sets the source to a URL:
loader.source = "https://example.com/my-asset.png";