embed image

package
{
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.display.Bitmap;

public class App extends Sprite
{
[Embed(source="library.swf", symbol="star")]
private var Star:Class;

[Embed(source="library.swf", symbol="square")]
private var Square:Class;

[Embed(source="library.swf", symbol="circle")]
private var Circle:Class;

[Embed(source="picture.jpg")]
private var Picture:Class;

public function App()
{
init();
}

private function init():void
{
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align=StageAlign.TOP_LEFT;

var star:Sprite = new Star();
addChild(star);
star.x = 100;
star.y = 100;

var square:Sprite = new Square();
addChild(square);
square.x = 200;
square.y = 100;

var circle:Sprite = new Circle();
addChild(circle);
circle.x = 300;
circle.y = 100;

var picture:Bitmap = new Picture();
addChild(picture);
picture.x = 400;
picture.y = 100;


}
}
}

你可能感兴趣的:(function,image,Class,import)