Sono riuscito a farlo funzionare:
Ora però devo metterlo anche all'interno di un movieclip ed ecco che non funziona più!!
Ho tolto tutti i "_root." ma il risultato è che l'animazione che deve seguire il mouse si vede ma sta ferma...
Ho modificato questi 2:
codice:
onClipEvent (load) {
_root.sopra = false;
this._y = 0;
this._x = 0;
}
//
onClipEvent (enterFrame) {
if (_root.sopra == true) {
this._y += (_root._ymouse-this._y)/3;
this._x += (_root._xmouse-this._x)/3;
}
}
codice:
onClipEvent (mouseMove) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (_root.sopra == false) {
_root.sopra = true;
}
else {
animazione._visible=0
}
}
}
con questi:
codice:
onClipEvent (load) {
sopra = false;
this._y = 0;
this._x = 0;
}
//
onClipEvent (enterFrame) {
if (sopra == true) {
this._y += (_ymouse-this._y)/3;
this._x += (_xmouse-this._x)/3;
}
}
codice:
onClipEvent (mouseMove) {
if (this.hitTest(_xmouse, _ymouse, true)) {
if (sopra == false) {
sopra = true;
}
else {
animazione._visible=0
}
}
}
Dove sbaglio??
grazie a tutti