click events in Adobe Animate CC
Dear Friends,
Iam converting an elearning lessons from Flash AS3 to Animate CC - JS. I have the following code for an activity like click each buttons and see corresponding popups.
import flash.events.MouseEvent;
for (var i:Number = 1; i<=5; i++)
{
this["btn" + i].addEventListener(MouseEvent.CLICK, btn_clicked);
}
function btn_clicked(event:MouseEvent)
{
trace(event.target.name.substr(3));
popup.gotoAndPlay("pg"+event.target.name.substr(3));
}
it should go to particular popup.
Kindly help me to convert this to java script code in animate CC.
Thanks in Advance,
Syed Abdul Rahim
