A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: HitTest/velocity problems on rising menu...

  1. #1
    Member
    Join Date
    May 2003
    Posts
    95

    HitTest/velocity problems on rising menu...

    Hello,

    I have a rising menu that when you roll your mouse over it, it rises and when you move your mouse away, it falls back down.

    I can't seem to get the HitTest right on this menu. The problem is that when I preview the menu, the menu falls down and then waits for the user to select it (I'd rather the menu look static until the user selects the menu). Then, the menu shakes up and down if you happen to select the bottom box of the menu. I'm not sure how to fix that.. Can you help me? I think the problem may have to do with the HitTest or the velocity/fukx code?

    This the code right now:

    Code:
    onClipEvent (load) {
    _root.newx = 145
    vel = 3
    }
    onClipEvent (enterFrame) {
    
    
    	if(this.hitTest(_root._xmouse,_root._ymouse,true)) _root.newx = -1;
    	else _root.newx = 145;
    
    
    
    	fukx += (_root.newx-_y)/vel
    	_y = Math.round(fukx);
    
    
    
    
    }
    I'll attach my file to this posting... Thanks!
    Attached Files Attached Files

  2. #2
    Member
    Join Date
    May 2003
    Posts
    95
    I figured out how to make the menu rise correctly with additional code, but the menu is still jumpy. I'm not sure if there is a solution to this...
    Attached Files Attached Files

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