var menu:Array = [mc1,mc2];
var fungsi:Array = [fungsimc1,fungsimc2];
for (var i:int = 0; i < menu.length; i++)
{
menu[i].buttonMode = true;
menu[i].addEventListener(MouseEvent.CLICK, fungsiklik);
}
function fungsiklik(event:MouseEvent):void
{
for (var i:int = 0; i < menu.length; i++)
{
if (event.currentTarget == menu[i])
{
fungsi[i]();
}
}
}
function fungsimc1()
{
trace("mc1");
}
function fungsimc2()
{
trace("mc2");
}
WHAT'S NEW?
Loading...
function,mc,button with array
- Judul : function,mc,button with array
- Penulis : PF studio
- Kategori : Archive Code Snippets
-
Rating : 100% based on 10 ratings. 5 user reviews.
Item Reviewed: function,mc,button with array
9 out of 10 based on 10 ratings. 9 user reviews.
facebook
twitter
google+
fb share