package {
import flash.display.MovieClip;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
public class Test extends MovieClip {
// be sure this is pointing to an image in your hardrive
[Embed(source='\images\whatsup.jpg')] public var MyImage:Class;
public function Test() {
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
var img:MyImage = new MyImage();
addChild(img);
}
}
}
Just attaching a symbol from the Library to the stage here:
package {
import flash.display.MovieClip;
public class Test extends MovieClip {
public var MyLibrarySymbol:MovieClip;
public function Test() {
var mc:MyLibrarySymbol= new MyLibrarySymbol();
addChild(mc);
}
}
}
No comments:
Post a Comment