A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: A little help with buttons

  1. #1
    Junior Member
    Join Date
    Apr 2002
    Posts
    2
    I want to focus a light unto the mouse whenever the mouse goes over the button or presses down on the button.

    For example, if I were to have a button that said "Sign Up," how would I make a light follow the mouse whenever the pointer went over the button. I have the light saved as a movie clip.

  2. #2
    My PitBull Bites Me! eag16's Avatar
    Join Date
    Feb 2002
    Posts
    250
    you would need to mask it.
    not sure how but i know it has something to do with mask

  3. #3
    Flashkit Jedi

    Join Date
    Jul 2001
    Location
    Coruscant System
    Posts
    3,426
    Hi,

    Put this code into your button's actions (assuming that you have named the light MC "light" in the instance panel):

    on(rollOver){
    startDrag(light, true);
    }
    on(rollOut){
    stopDrag();
    }

    This will keep the light MC over the button but stop dragging it. If you want it to dissapear when the mouse rolls out of the button put this code under the stopDrag() function:

    light._y = -500;

    XFM

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