new to AC3.. a bit of help please
Hi all,
First off i am sorry if i did not tag the code peoperly (i am not sure how i am supposed to that).
it has been a while since i used flash, and now i am using it for ranch program with lots of trees etc....
Here is what i am trying to do:
button_1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage);
function fl_ClickToGoToWebPage(event:MouseEvent):void
{
navigateToURL(new URLRequest("ranch.php?id=1"), "tdes");
}
button_2.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage);
function fl_ClickToGoToWebPage(event:MouseEvent):void
{
navigateToURL(new URLRequest("ranch.php?id=2"), "tdes");
}
and so on... i have 130 of these... do I have to do them manually one by one, or is there a way to incorporate a loop.
a bit more complicated i guess:
is there a way to check what buttons (instances) are there first and excucute only when instance button_x is available .. would it matter.
I mean let us say
button_12.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage);
function fl_ClickToGoToWebPage(event:MouseEvent):void
{
navigateToURL(new URLRequest("ranch.php?id=12"), "tdes");
}
But there is no instance name button_12 or will it just pass through it and continue the loop (if a loop is possible) or will it cause an error and stop the loop there..