A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: button with rollover description

  1. #1
    damn, im smooth drkknght's Avatar
    Join Date
    Feb 2001
    Posts
    159

    button with rollover description

    heya! nice new digs!

    the scenario:
    im trying to create a whole buncha buttons that, on mouse-over, display a little text box describing where the button is gonna take you.

    the catch:
    id like that description text ("bio box") to move with the mouse. so, when you mouse over the button hit area, if you move the mouse slightly to the left, the bio box moves too (tho the actual button stays put)

    it sounds like something i've done before by accident, but i cant remember how i did it.

    any help?
    i'm not new to action scripting. i'm just bad at it.

  2. #2
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    How about this,

    make a movie clip, in this clip put the description for each buttons in successive frames (leave frame 1 blank though, with a stop(); action) attach a clip event like this to the clip

    onClipEvent(enterFrame) {
    this._x += (_root._xmouse - this._x) / 10;
    this._y += (_root._ymouse - this._y) / 10;
    }

    give the clip the instance name description now on the button use

    on (rollOver) {
    _root.description.gotoAndStop(frameNumberWithTheCo rrespondingTextIn);
    }
    on (rollOut) {
    _root.description.gotoAndStop(1);
    }

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