Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

319
Views
Adobe Animate y JavaScript: ¿rotación 2D del símbolo gráfico al presionar un botón?

En Adobe Animate para una película HTML5/JavaScript, ¿cómo debo cambiar lo siguiente para rotar el símbolo gráfico 'VerticalRail' en el sentido de las agujas del reloj 1 grado?

Por el momento parece que gira 1 grado en sentido horario, pero solo una vez. Necesita girar constantemente mientras se presiona el botón.

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

ACTUALIZAR

Lo hice funcionar agregando un + antes del = para incrementar los valores del ángulo de rotación. Asi que:

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

Sin embargo, me pregunto si esta es la forma correcta de hacer ese código. ¿Algún consejo?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!