Grande, funge tutto!!
Codice PHP:
onClipEvent (load) {
clip = "B";
function swappa() {
if (testx=1) {
_root.targetx = 100;
_root.targety = 200;
speed =60;
_root.onEnterFrame = function() {
_x += (_root.targetx-_x)/speed;
_y += (_root.targety-_y)/speed;
};
testx=2;
}
trace(testx);
car = laClip1.getBytesLoaded();
tot = laClip1.getBytesTotal();
perc = Math.round((car/tot)*100);
_parent.loadimage = "Loading..."+perc+"%";
if (car>1024 && car == tot) {
if (laClip1._alpha<90) {
laClip1._alpha += 2;
laClip2._alpha -= 2;
_parent.loadimage = "";
} else {
laClip1._alpha = 100;
laClip2._alpha = 0;
clearInterval(e);
_parent.loadimage = ""; if (testx=2) {
_root.targetx = 200;
_root.targety = 100;
speed =60;
_root.onEnterFrame = function() {
_x += (_root.targetx-_x)/speed;
_y += (_root.targety-_y)/speed;
};
testx=1;
}
}
}
}
// swappa
function playSlide() {
if (clip == "A") {
laClip1 = clipA;
laClip2 = clipB;
clip = "B";
} else {
laClip1 = clipB;
laClip2 = clipA;
clip = "A";
}
laClip1._alpha = 0;
laClip2._alpha = 100;
trace(laClip1);
trace(laClip2);
laClip1.loadMovie("images2/"+_root.partenza+".jpg", "test_mc");
e = setInterval(swappa, 20);
}
}
Come puoi vedere l'ho implementato con la funzione di movimento continuo.
Grazie ancora!!