Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Arrow Move

Guest
May 21, 2010 May 21, 2010

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.

arrow.JPG

Thanks,

JaxNa

TOPICS
ActionScript
483
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 22, 2010 May 22, 2010

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.

Translate
Community Expert ,
May 21, 2010 May 21, 2010

use a loop and Key.isDown() method.  check the key class.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 21, 2010 May 21, 2010

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;
    }
}

arrow.JPG

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 22, 2010 May 22, 2010

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 23, 2010 May 23, 2010

I tried this its working.

thanks a lot.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 23, 2010 May 23, 2010
LATEST

you're welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines