-
Multiple Links in one rotating banner
I am really stuck here (btw I am quite new to flash). Also, I am using CS4. I have a banner that I'm creating, it has 5 images that rotate via motion tweening. I've created an invisibile button (and also attempted to create multiple buttons) so that when you click on a specific image it will bring you to that URL. So far I have only gotten it to work for the final URL. No matter which image I click on, it only brings up that last URL. Any assistance would be very much appreciated. Here is my code:
btn1.addEventListener(MouseEvent.CLICK, buttonClickHandler1);
function buttonClickHandler1(event:MouseEvent):void {
navigateToURL(new URLRequest("http://www.google.com"));
}
btn2.addEventListener(MouseEvent.CLICK, buttonClickHandler2);
function buttonClickHandler2(event:MouseEvent):void {
navigateToURL(new URLRequest("http://www.yahoo.com"));
}
btn3.addEventListener(MouseEvent.CLICK, buttonClickHandler3);
function buttonClickHandler3(event:MouseEvent):void {
navigateToURL(new URLRequest("http://www.msn.com"));
}
btn4.addEventListener(MouseEvent.CLICK, buttonClickHandler4);
function buttonClickHandler4(event:MouseEvent):void {
navigateToURL(new URLRequest("http://www.gmail.com"));
}
btn5.addEventListener(MouseEvent.CLICK, buttonClickHandler5);
function buttonClickHandler5(event:MouseEvent):void {
navigateToURL(new URLRequest("http://www.newegg.com"));
}
-
Can you post your .fla? At a glance that looks to me as though it should work.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|