Richiamare oggetti dalla libreria

Oltre a richiamare un oggetto dalla libreria crea un movieclip vuoto.
codice:
//buttone
my_btn.onRelease = function () {
this._parent.playFn();
};

//crea movieclip vuoto
this.createEmptyMovieClip(“contenitore”, this.getNextHighestDepth());

//richiamare un oggetto dalla libreria
this.contenitore.attachMovie(“palla”, “palla_nuova”, this.contenitore.getNextHighestDepth());

//centrarlo
var posX:Number = (Stage.width / 2)-(this.contenitore.palla_nuova._width/2);
var posY:Number = (Stage.height / 2)-(this.contenitore.palla_nuova._height/2);

this.contenitore._x = posX;
this.contenitore._y = posY;

this.contenitore.palla_nuova._x = this.contenitore.palla_nuova._y = 0;
this.contenitore.palla_nuova.stop();

Una Risposta a “Richiamare oggetti dalla libreria”

  1. Diego Vurro Dice:

    Per me parlate arabo…io so solo fare quadratini e cerchietti e spostarli nello stage…

Lascia un Commento

Fill in your details below or click an icon to log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Log Out / Modifica )

Foto Twitter

You are commenting using your Twitter account. Log Out / Modifica )

Foto di Facebook

You are commenting using your Facebook account. Log Out / Modifica )

Connecting to %s


Follow

Get every new post delivered to your Inbox.