Fork me on GitHub

Programming Design Notes

Actionscript 2 動態加入元件

| Comments

以免自己忘記了又要東找西找
function sayHelloWorld():Void {
trace(this);
removeMovieClip(this);
}
this.attachMovie("btnHelloWorld","btnHelloWorld",1);
this.btnHelloWorld._x = 200;
this.btnHelloWorld._y = 200;
this.btnHelloWorld.onPress = sayHelloWorld;


attachMovie(元件名稱, Actionscript 內的名稱, 深度)


相關書籍: Beginning ActionScript 2.0 (Wrox Beginning Guides)Essential ActionScript 2.0Learning ActionScript 2.0 for Macromedia Flash 8