A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: clickable close button on rolloff panel code help

  1. #1
    Junior Member
    Join Date
    Oct 2008
    Posts
    3

    clickable close button on rolloff panel code help

    Hello,
    I've got a job for an expandable MPU in AS2. When you rollOver the MPU it expands and has a rollOff button covering the whole of the expanded part. But I have also got a Close button on the expanded panel that you have to click to also retract the panel. Could someone please help me in telling me what the code is to allow you to rollOUT of the expanded panel part but onto the Close button without it retracting before you click on it.

    Thank you very much

  2. #2
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    put a simple conditional check in your rollOff action for the rollOff button..

    ie:

    actionscript Code:
    someClip.onRollOut = function(){
         if (this._parent.closeButton_btn.hitTest(_root._xmouse, _root._ymouse, true)){
              //mouse is on close button
              //do whatever you want here
         else{
              //mouse is NOT on close button..nd we have rolled off rollOff button
              //do whatever you want here now..
         }
    }

Tags for this Thread

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