public final class Resource { [Embed(source="/../assets/toolbar_play.png")] public static var TOOLBAR_PLAY:Class; [Embed(source="/../assets/toolbar_pause.png")] public static var TOOLBAR_PAUSE:Class; [Embed(source="../assets/toolbar_ff.png")] public static var TOOLBAR_FF:Class; [Embed(source="../assets/toolbar_rew.png")] public static var TOOLBAR_REW:Class; [Embed(source="../assets/loading_video.swf")] public static var LOADING_SWF:Class; }
这样通过这个Resource类进行管理。
使用方法是: var testImg:Image = new Image(); testImg.source = Resource.TOOLBAR_PAUSE; var testImg:Image = new Image(); testImg.source = Resource.TOOLBAR_PAUSE;