How to track and find which button clicked in Animate CC script.
dear friends,
iam converting elearning lessons in animate cc. have following code activity click each buttons , 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));
}
kindly me convert java script code in animate cc.
thanks in advance,
syed abdul rahim
dear friends,
iam converting elearning lessons flash as3 to animate cc - js. have following code activity click each buttons , 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 particular popup.
kindly me convert java script code in animate cc.
thanks in advance,
syed abdul rahim
More discussions in Adobe Animate CC - General
adobe
Comments
Post a Comment