A Flash Developer Resource Site

Page 2 of 2 FirstFirst 12
Results 21 to 22 of 22

Thread: [F8] Current selection cannot have actions applied to it

  1. #21
    Junior Member
    Join Date
    Jul 2001
    Location
    B'klyn, NY
    Posts
    5
    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.

  2. #22
    Junior Member
    Join Date
    Jul 2001
    Location
    B'klyn, NY
    Posts
    5
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center