A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: stupid bloody buttons

  1. #1
    junior master chef j_hunter182's Avatar
    Join Date
    Jun 2003
    Location
    Hull, East Yorkshire, UK
    Posts
    556

    stupid bloody buttons

    i have a vertical row of buttons (moveclips really) down the left side of my page. when u rollover an animation plays on the button. the thing is, when u put the mouse between 2 buttons u can make them both play. the buttons arent overlapping and are point-pixel perfectly touchin. i even if i seperate the 1 pixel apart this still happens. is this something im goin to have to live with or can i sort this out in anyway?
    cheers
    jh

  2. #2
    you're probably going to have to post the .fla file so that i or someone else can view it.

  3. #3
    Left Wing Pinko
    Join Date
    May 2003
    Location
    Earth
    Posts
    33
    and a working link to the product

  4. #4
    junior master chef j_hunter182's Avatar
    Join Date
    Jun 2003
    Location
    Hull, East Yorkshire, UK
    Posts
    556
    here it is.......
    its only the buttons, but thats all thats needed.
    Attached Files Attached Files

  5. #5
    Insomniac felicks's Avatar
    Join Date
    Oct 2002
    Location
    South London
    Posts
    213
    1)Replace the code in frames 1 and 12 with simply this:

    stop();

    2)Then go back to the main timeline.

    3)Select one of the movieClips by single clicking it and open the actions panel. Then enter the code:

    on (rollOver) {
    gotoAndPlay(2);
    }
    on (rollOut) {
    gotoAndPlay(1);
    }

    4) Repeat step 3 for each of the movieclip buttons, making sure not to open them in symbol editing mode (stay on the main timeline). The script is the same for all the buttons.

    This places the code directly on the movie clip ratherthan inside it. It does the same job as your scripting but more simply, and it also solves your problem!
    Sleep is for people without imagination.

  6. #6
    Insomniac felicks's Avatar
    Join Date
    Oct 2002
    Location
    South London
    Posts
    213
    My appologies, the code for step 3 needs to be this:

    on (rollOver) {
    gotoAndPlay(2);
    }
    on (rollOut) {
    gotoAndPlay(13);
    }

    By putting 'gotoAndPlay(1)' on the 'on (rollOut)' event rather than 'gotoAndPlay(13)' it was missing your "mouseout" button animation. It's only the target frame number that needs to be different.

    Also, by using this code, you do not need to place a button inside the movie clip, instead simply put a background rectangle on the bottom layer of the clip the size you want the clip "button" to be.This wil act as a "hit" frame for the movieClip and define the size of it for the on (rollOver) event.
    Last edited by felicks; 07-21-2003 at 10:23 PM.
    Sleep is for people without imagination.

  7. #7
    junior master chef j_hunter182's Avatar
    Join Date
    Jun 2003
    Location
    Hull, East Yorkshire, UK
    Posts
    556
    ah rite, thanks a lot, got it workin.
    cheers
    jh

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