March 16, 2012

Flash AS 3.0, URL Example

Create two layers. One for button and the other for Action Script. Create a button and name it homeButton.
Then go to AS layer and open Actions. Add the below codes in it.

Codes:
stop();
homeButton.addEventListener(MouseEvent.CLICK, gotoAuthorPage);
function gotoAuthorPage(event:MouseEvent):void
{
    var targetURL:URLRequest = new URLRequest("http://www.amasya.edu.tr");
    navigateToURL(targetURL); 
}

No comments:

Post a Comment