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

164
Views
Cómo detectar en qué Sprite se hizo clic

Estoy tratando de averiguar cómo saber en qué Sprite se hizo clic

 var current_dots:Array<Sprite>= []; for(i in 0...4){ var page = new Sprite(); current_dots.push(page); page.on('pointerdown', dot_click); this.addChild(page); } function dot_click(){ trace("CLICKED"); }

dado que cada sprite se declaró en el ciclo for, no estoy seguro de cómo identificar en cuál se hace clic

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Pensé que una manera de hacerlo era así

 function dot_click(e:InteractionEvent){ for( i in 0...current_dots.length){ if(current_dots[i] == e.currentTarget) { trace("Clicked") } } }

tenía que pasar el parámetro interactivo

about 4 years ago · Juan Pablo Isaza Report
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!