
Copy link to clipboard
Copied
Hey hi,
in this image orange arrow i want to move left-right. and up-down, how i can do this, can u plz help me.
Thanks,
JaxNa
1 Correct answer
as2 doesn't have any 3d capabilities so you'll need to use a sequence of movieclips that display the various views or your arrow and then you'll need to code for the appropriate view to appear at the appropriate time.
Copy link to clipboard
Copied
use a loop and Key.isDown() method. check the key class.

Copy link to clipboard
Copied
see here is my code, but my arrow display like this, i want to display like 3D arrow.
So what can i do for this?
var intervalIDLine:Number;
right_btn.onPress = function() {
if (arrow_mc._rotation<0) {
arrow_mc._rotation = arrow_mc._rotation+5;
}
intervalIDLine = setInterval(setAngleRight, 200);
};
right_btn.onRelease = function() {
clearInterval(intervalIDLine);
};
function setAngleRight() {
if (arrow_mc._rotation<0) {
arrow_mc._rotation = arrow_mc._rotation+5;
}
}
var intervalLeftID:Number;
left_btn.onPress = function() {
if (arrow_mc._rotation>=-172.094131469727) {
arrow_mc._rotation = arrow_mc._rotation-5;
}
intervalLeftID = setInterval(setAngleLeft, 200);
};
left_btn.onRelease = function() {
clearInterval(intervalLeftID);
};
function setAngleLeft() {
if (arrow_mc._rotation>=-172.094131469727) {
arrow_mc._rotation = arrow_mc._rotation-5;
}
}
Copy link to clipboard
Copied
as2 doesn't have any 3d capabilities so you'll need to use a sequence of movieclips that display the various views or your arrow and then you'll need to code for the appropriate view to appear at the appropriate time.

Copy link to clipboard
Copied
I tried this its working.
thanks a lot.
Copy link to clipboard
Copied
you're welcome.

