merapper
05-22-2008, 09:01 PM
Ok all this is is a satelite (in an external swf that 3D rotates and has stop on each frame)... All I want to do is make the satelite rotate on where the mouse cursor is on the stage... I have the code in AS 2... but I need to make it AS 3 so I can work with it coz it's made by a friend and he only knows as2, and i know only 3....
PLEASE HELP ME DO THIS... I know it's complex... and help me set the external swf too pls.... (i have the source of it too)...
this.onEnterFrame = function() {
//moving satelite
j += 5;
if (j>=100) {
j = 100;
}
satelit._xscale=j*75/100;
satelit._yscale=j*75/100;
satelit._alpha = j;
i += 0.1;
satelit._rotation = Math.sin(i)*2-30;
satelit._y = 200+Math.sin(i)*20;
if (pas == 0) {
bg._alpha += speed;
if (bg._alpha>=100) {
pas = 1;
}
}
if (pas == 1) {
menu._alpha += speed*3;
if (menu._alpha>=100) {
pas = 2;
pass = 0;
}
}
if (pas == 2) {
if (pass == 0) {
home._alpha += speed*2;
home._x -= speed*1.5;
if (home._alpha>=100) {
pass = 1;
}
}
if (pass == 1) {
aboutus._alpha += speed*2;
aboutus._x -= speed*1.5;
if (aboutus._alpha>=100) {
pass = 2;
}
}
if (pass == 2) {
services._alpha += speed*2;
services._x -= speed*1.5;
if (services._alpha>=100) {
pass = 3;
}
}
if (pass == 3) {
gallery._alpha += speed*2;
gallery._x -= speed*1.5;
if (gallery._alpha>=100) {
pass = 4;
}
}
if (pass == 4) {
contact._alpha += speed*2;
contact._x -= speed*1.5;
if (contact._alpha>=100) {
pass = 5;
pas = 3;
xpoz = contact._x;
}
}
}
if (pas == 3) {
sus._alpha += speed*3;
jos._alpha += speed*3;
sus.play();
jos.play();
if (sus._alpha>=100) {
pas = 4;
}
}
};
PLEASE HELP ME DO THIS... I know it's complex... and help me set the external swf too pls.... (i have the source of it too)...
this.onEnterFrame = function() {
//moving satelite
j += 5;
if (j>=100) {
j = 100;
}
satelit._xscale=j*75/100;
satelit._yscale=j*75/100;
satelit._alpha = j;
i += 0.1;
satelit._rotation = Math.sin(i)*2-30;
satelit._y = 200+Math.sin(i)*20;
if (pas == 0) {
bg._alpha += speed;
if (bg._alpha>=100) {
pas = 1;
}
}
if (pas == 1) {
menu._alpha += speed*3;
if (menu._alpha>=100) {
pas = 2;
pass = 0;
}
}
if (pas == 2) {
if (pass == 0) {
home._alpha += speed*2;
home._x -= speed*1.5;
if (home._alpha>=100) {
pass = 1;
}
}
if (pass == 1) {
aboutus._alpha += speed*2;
aboutus._x -= speed*1.5;
if (aboutus._alpha>=100) {
pass = 2;
}
}
if (pass == 2) {
services._alpha += speed*2;
services._x -= speed*1.5;
if (services._alpha>=100) {
pass = 3;
}
}
if (pass == 3) {
gallery._alpha += speed*2;
gallery._x -= speed*1.5;
if (gallery._alpha>=100) {
pass = 4;
}
}
if (pass == 4) {
contact._alpha += speed*2;
contact._x -= speed*1.5;
if (contact._alpha>=100) {
pass = 5;
pas = 3;
xpoz = contact._x;
}
}
}
if (pas == 3) {
sus._alpha += speed*3;
jos._alpha += speed*3;
sus.play();
jos.play();
if (sus._alpha>=100) {
pas = 4;
}
}
};