-
I've tried this script successfully. However, upon adding additional buttons to the scene and applying the appropriate instance name I get this error message:
"Duplicate function definition. function myButtonFunction(event: MouseEvent) {"
How do I correct this?
Last edited by macphoto; 11-24-2011 at 03:25 PM.
-
Ok, I've figured out how to have multiple button links to URL's in one scene using Flash CS3, Action Scripts 3.0. After appointing each button an appropriate instance name I successfully used this script within the same Action Script window. I modified the script for each button I used. The buttons are linking to FACEBOOK.com, TWITTER.com and BLOGGER.com. Thanks and good luck to everybody!
twitter.addEventListener(MouseEvent.CLICK, twitterFunction);
function twitterFunction(event: MouseEvent) {
var request:URLRequest = new URLRequest("https://twitter.com");
navigateToURL(request, "_self");
}
facebook.addEventListener(MouseEvent.CLICK, facebookFunction);
function facebookFunction(event: MouseEvent) {
var request:URLRequest = new URLRequest("http://www.facebook.com);
navigateToURL(request, "_self");
}
blog.addEventListener(MouseEvent.CLICK, blogFunction);
function blogFunction(event: MouseEvent) {
var request:URLRequest = new URLRequest("http://blogger.com");
navigateToURL(request, "_self");
}
Last edited by macphoto; 11-24-2011 at 04:07 PM.
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
|