Make URL buttons in ActionScript 3.0
by Sanju[ Edit ] 2009-12-29 23:41:15
Make URL buttons in ActionScript 3.0
1. Create a button in the library.
2. Drag it onto stage 2 times and position them.
3. Give the instance names
button_01 and button_02.
4. Add Event Listeners and code below:
button_01.addEventListener( MouseEvent.CLICK, goto_hongkiat );
button_02.addEventListener( MouseEvent.CLICK, goto_koflash );
function goto_hongkiat(e:MouseEvent):void
{
navigateToURL( new URLRequest( "http://www.hongkiat.com" ), "_blank" );
}
function goto_koflash(e:MouseEvent):void
{
navigateToURL( new URLRequest( "http://www.koflash.com" ), "_blank" );
}