A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Flash buttons I made

  1. #1

    Flash buttons I made

    Yo guys!

    I made some sweet flash buttons that roll over real nice and play in reverse when the mouse leaves the entire scene; no flaws!

    But I don't know how to change links that Open's the URL in the current window (in a _self manner)

    Anyone know?
    Last edited by GUNROCK; 05-21-2005 at 07:21 PM.

  2. #2
    I tried... dbarbarian's Avatar
    Join Date
    Aug 2003
    Location
    Berkeley, California, USA
    Posts
    678
    code:

    on (release) {
    getURL("www.url.com", "_self");
    }
    on (release) {
    getURL("www.url.com", "_blank");
    }
    on (release) {
    getURL("www.url.com", "_parent");
    }
    on (release) {
    getURL("www.url.com", "_top");
    }


  3. #3
    Thanks for the reply dbarbarian

    I gave it a try and it gave an error saying 'Mouse events are permitted only for button instances'

    I know I need to add it to a button instance (duh), but where can I do that since it doesn't like it on the timeline?
    Last edited by GUNROCK; 05-22-2005 at 12:23 PM.

  4. #4
    I tried... dbarbarian's Avatar
    Join Date
    Aug 2003
    Location
    Berkeley, California, USA
    Posts
    678
    If your "button" is a movie clip, then put this on the movie clip instance.

    code:

    onClipEvent (mouseUp) {
    if (this.hitTest(_root._xmouse, _root.ymouse, true)) {
    getURL("www.url.com", "_blank");
    //or getURL("www.url.com", "_blank");
    //or getURL("www.url.com", "_parent");
    //or getURL("www.url.com", "_top");
    }
    }


  5. #5
    Yo I just got flash mx 2004 2 days ago so I don't know where to access the 'movie clip instance'

    Help me out and I will love you !

  6. #6
    Senior Member onine's Avatar
    Join Date
    Mar 2005
    Posts
    627
    i think that:

    'Mouse events are permitted only for button instances'

    means that you put your script on the frame rather than the button.

    click on the button and go to the actions panel (if you cant see it go to:

    window > actions

    and put the code in there).

    The actions panel says at the top whether you are doing a frame action or a button action.

  7. #7
    Yeah that's what I'm talkin bout'!!

    I love it when people speak up and help out. Thanks guys very much.

    end result: http://www.imsgaming.com

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