Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

321
Visualizações
Adobe Animate and JavaScript- 2D Rotation of Graphic Symbol on Button Press?

In Adobe Animate for an HTML5/JavaScript movie, how should I change the following for rotating the graphic symbol 'VerticalRail' clock-wise by 1 degree?

At the moment it looks like it's rotating 1 degree CW, but only once. It needs to rotate constantly while button pressed.

//Right Frame Rotate CW Buttons
this.ButtonRotateCWRightFrame.addEventListener("mousedown", RF_RotateCW_Down.bind(this));

this.ButtonRotateCWRightFrame.addEventListener("pressup", RF_RotateCW_Up.bind(this));

this.ButtonRotateCCWRightFrame.addEventListener("mousedown", RF_RotateCCW_Down.bind(this));

this.ButtonRotateCCWRightFrame.addEventListener("pressup", RF_RotateCCW_Up.bind(this));


//Right Frame Rotate CW Buttons functions to move Rotate Frame CW
function RF_RotateCW_Down() {
createjs.Ticker.addEventListener("tick",updateRF_RotateCW);
}

function RF_RotateCW_Up() {
createjs.Ticker.removeEventListener("tick",updateRF_RotateCW);
}

function updateRF_RotateCW(){

 var angle = 1/Math.PI;
  root.VerticalRail.rotation = angle;
}

UPDATE

I got it working by adding a + before the = to increment the values of the rotation angle. So:

function updateRF_RotateCW(){
 var angle = 1/Math.PI;
  root.RFLensHolder.rotation += angle;
}

However, I'm wondering if this is the correct way of doing that code. Any pointers?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda