sul primo frame di _root
codice:
spostamento = 0;
sposta_giu = false;
sposta_su = false;
sul tuo Mc
codice:
onClipEvent (enterFrame) {
if (_root.sposta_giu == true) {
if (this.spostamento<=400) {
this._y = this._y+this.spostamento;
this.spostamento++;
trace(this.spostamento);
}
}
if (_root.sposta_su == true) {
if (this.spostamento<=400) {
this._y = this._y-this.spostamento;
this.spostamento++;
trace(this.spostamento);
}
}
}
/////////////////////////////////////
sul bottone che sposta il mc in giù
codice:
on (press) {
_root.sposta_giu = true;
}
on (release) {
_root.sposta_giu = false;
}
//////////////////////////////
sul bottone che sposta il mc in sù
codice:
on (press) {
_root.sposta_su = true;
}
on (release) {
_root.sposta_su = false;
}
mo vado a mangiare.... :sgrat:
fammi sapere