Search code examples
actionscript-3flashactionscriptflash-cs5

Flash Buttons Not Working Correctly


I create a set of transparent flash buttons which are working to a degree, but when you hover over the FaceBook, Twitter, and Instagram logos, the button doesn't change into a link. You have to be on the corner of the button for it to change into a link. See http://pizzli.com/testanimation.html. Here is my ActionScript for the buttons

    import flash.events.MouseEvent;
import flash.net.URLRequest;

b1.addEventListener(MouseEvent.CLICK, b1ClickHandler);

function b1ClickHandler(e:MouseEvent)
{
    navigateToURL(new URLRequest("http://www.facebook.com/"));
}

b2.addEventListener(MouseEvent.CLICK, b2ClickHandler);

function b2ClickHandler(e:MouseEvent)
{
    navigateToURL(new URLRequest("http://www.twitter.com/"));
}

b3.addEventListener(MouseEvent.CLICK, b3ClickHandler);

function b3ClickHandler(e:MouseEvent)
{
    navigateToURL(new URLRequest("http://www.instagram.com/"));
}

b4.addEventListener(MouseEvent.CLICK, b4ClickHandler);

function b4ClickHandler(e:MouseEvent)
{
    navigateToURL(new URLRequest("mailto:[email protected]));
}

Solution

  • Your problem doesn't come from this code. You just have to put your transparent flash buttons over the icons (they are under them).