Jump to content

  • Free consultations and support
  • Live chatClick Here for Live Chat
  • Call ico 1888-906-1888
    Phone support: Open

    Ready for your call :)

    Our business hours:

    Mon — Fri, 2am — 8pm (EST)

    US & EU support teams

    Phone support: Closed

    We are back in: 1h 20m

    Our business hours:

    Mon — Fri, 2am — 8pm (EST)

    US & EU support teams


Making URL buttons in Flash ActionScript 3.0

in flash actionscript 3.0 making url buttons

  • Please log in to reply
 

#1 SmartWeb

SmartWeb

    Senior Member

  • Designer
  • 271 posts

Posted 03 February 2013 - 05:32 PM

1.Create a button in your library.
2.Drag your button onto the stage two times and position them.
3.Give names to the instance ; btn_01 and btn_02.
4.Add the Event Listeners as in the below code:

btn_01.addEventListener( MouseEvent.CLICK, goto_domain1 );
btn_02.addEventListener( MouseEvent.CLICK, goto_domain2 );
function goto_domain1(e:MouseEvent):void
{ navigateToURL( new URLRequest( "http://www.domain1.com" ), "_blank" );
}
function goto_domain2(e:MouseEvent):void
{
navigateToURL( new URLRequest( "http://www.domain2.com" ), "_blank" );
}




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users