allora dovremo esserci

massimox
minimox
massimoy
minimoy
questo è il tuo quadrato virtuale e i clip li devi posizionare all'inteno di questo quadrato virtuale perchè prendono le loro posizioni iniziali

doppio click per aprire
doppio click per chiudere



//da qui in poi comincia lo script che devi copiare.........








z = true;
aperta=false

massimox=400
minimox=100
massimoy=350
minimoy=50

for (i=1; i<=10; i++) {
this["c"+i].foto.loadMovie("HB"+i+".jpg");
this["b"+i].foto.loadMovie("HB"+i+".jpg");
this["c"+i]._rotation = random(100)-50;
this["c"+i]._xscale = this["c"+i]._yscale=50;
this["c"+i].onMouseDown = function() {
trace(z);
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (getTimer()-click<400) {
if (z == true) {
if (aperta==false){
open_pic(this._name);
}else{
close_pic(this._name);
}
z = false;

} else if (z == false) {
z = true;
}
} else {
click = getTimer();
}
}
};
this["c"+i].onPress = function() {
posizionex=this._x
posizioney=this._y
trace("posizione "+posizionex)

this.onEnterFrame = function() {
_level0["c"+substring(this._name, 2, 1)].swapDepths(100);
dif = _root._xmouse-this._x;
dif2 = _root._ymouse-this._y;
this._x += dif/10;
this._y += dif2/10;
trace(x++);
};
};
this["c"+i].onReleaseOutside = function() {
if(this._x<minimox or this._x>massimox or this._y<minimoy or this._y>massimoy){
ritorna(this._name)
}else{
delete this.onEnterFrame;
}
}

this["c"+i].onRelease = function() {
if(this._x<minimox or this._x>massimox or this._y<minimoy or this._y>massimoy){
ritorna(this._name)
}else{
delete this.onEnterFrame;
}
};
}
function open_pic(nome) {
aperta=true
this[nome].swapDepths(100);
_level0.val_rot = this[nome]._rotation;
this[nome]._rotation = 0;
this.onEnterFrame = function() {
trace("ciao")
if (this[nome]._xscale<100) {
this[nome]._xscale = this[nome]._yscale += 5;
} else {
delete this.onEnterFrame;
}
};
}
function close_pic(nome) {
aperta=false
trace("passato su "+nome);
this.onEnterFrame = function() {
if (this[nome]._xscale>50) {
this[nome]._xscale = this[nome]._yscale -= 5;
} else {
trace(_level0.val_rot);
this[nome]._rotation = _level0.val_rot;
delete this.onEnterFrame;
}
};
}

function ritorna(nome){
trace("ok")


this[nome].onEnterFrame = function() {

diff =int(this._x-posizionex)
diff2 =int(this._y-posizioney)
this._x -= diff/10;
this._y -= diff2/10;
trace(x++);
if(diff==0){
delete this.onEnterFrame
}
}
}