questo è tutto il cod nel fotogramma 5:
Codice PHP:
import mx.transitions.Tween;
import mx.transitions.easing.Regular;
import mx.transitions.easing.Strong;
import mx.transitions.easing.Back;
import mx.transitions.easing.Elastic;
import mx.transitions.easing.Bounce;
import mx.transitions.easing.None;
var ___TWEENtop5:Tween = new Tween(body_mc, "_x", Strong.easeOut, body_mc._x, _root.larghessas/2, 15, false);
var tweenListener:Object = new Object();
tweenListener.onMotionFinished = function():Void {
// INIZIO MOUSE LISTENER CHE IN BASE AL MOVIMENTO MI SPOSTA IL BODY //////////////////////////////////////////
var mouseListener:Object = new Object();
mouseListener.onMouseMove = function() {
if (_ymouse < 330 ){
fs_mc._visible = false
fds_mc._visible = false
if (_xmouse < _root.larghessas/2 - 21) {
// MUOVE MC A SX
body_mc.onEnterFrame = function () {
var ___TWEENmouse:Tween = new Tween(this, "_x", Strong.easeOut, this._x,this._x +15, 15, false);
if (this._x >= _root.larghessas/2) {
delete this.onEnterFrame;
}
};
};
if (_xmouse > _root.larghessas/2 + 21) {
// MUOVE MC A DX
body_mc.onEnterFrame = function () {
var ___TWEENmouse2:Tween = new Tween(this, "_x", Strong.easeOut, this._x,this._x - 15, 15, false);
if ( (this._x + this._width) <= _root.larghessas/2 ) {
delete this.onEnterFrame;
}
};
};
};
// ELIMINA ENTERFRAME SE IL YMOUSE è FUORI DAL CENTRO
if (_ymouse > 330 or _ymouse < 100){
fs_mc._visible = true
fds_mc._visible = true
delete body_mc.onEnterFrame;
}
// ELIMINA ENTERFRAME SE IL MOUSE è FERMO IN POSIZIONE CENTRALE +O-
if ((_xmouse > _root.larghessas/2) && (_xmouse < _root.larghessas/2 + 20)){
delete body_mc.onEnterFrame;
}
// ELIMINA ENTERFRAME SE IL MOUSE è FERMO IN POSIZIONE CENTRALE +O-
if ((_xmouse < _root.larghessas/2) && (_xmouse > _root.larghessas/2 - 20)){
delete body_mc.onEnterFrame;
}
};
Mouse.addListener(mouseListener);
// FINE MOUSE LISTENER CHE IN BASE AL MOVIMENTO MI SPOSTA IL BODY //////////////////////////////////////////
};
___TWEENtop5.addListener(tweenListener);
non sembra dichiarato in un oggetto .. :master: