-
Button to call URL
I have a button that I need to call a URL. I am using the following script:
stop();
import flash.events.MouseEvent;
var request:URLRequest = new URLRequest("http://www.idyllwildcommunitynetwork.org");
icn_bttn.addEventListener(MouseEvent.CLICK,b2bClic k);
function b2bClick(event:MouseEvent):void{
navigateToURL(request);
}
I don't get the "hand" when I hover over the button and, of course, it doesn't call the URL.
-
Hi,
Your script is correct... see the add Event listener line. You have given the space for function name "b2bClic k". remove space.
stop();
import flash.events.MouseEvent;
var request:URLRequest = new URLRequest("http://www.idyllwildcommunitynetwork.org");
icn_bttn.addEventListener(MouseEvent.CLICK,b2bClic k);
function b2bClick(event:MouseEvent):void{
navigateToURL(request);
}
-
if icn_bttn is a movie clip and not a true button all you need to do to get the "hand" to show up is type:
icn_btth.buttonMode = true;
-
Sorry, there is no space it is b2bClick. I don't know why it showed like that sine I did a cut and paste.
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
|