playing a movie symbol problem

  • astone315
  • Born
  • Born
  • astone315
  • Posts: 3

Post 3+ Months Ago

I am hoping someone here can help me out. If you look at this:

http://www.astone315.com/test.swf

and you put your mouse over the about us menu, the menu goes down, that part is fine, but the part that i need help with is that when you put your mouse over the green part that the menu goes behind, the menu still goes down. I only want the menu to go down when the mouse goes over the about us and below. Is there anyway to make a graphic that overrides actions that are behind it or something?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Hmm, ok the problem is apparently a hitTest problem. Just because you can't see the clip doesn't mean hitTest can't detect when the mouse is over it. This is always one of those annoying things about hitTest...lol. I love it, but I hate it sometimes.

Ok, the easiest solution I can think of in your case without having to redo your menu or whatever is to add onto your if statement.

Sample code usually helps to debug a problem, but I'm just gonna take a swing in the dark and guess that you are using something like

Code: [ Select ]
onClipEvent (enterFrame) {
    if (this.hitTest(_root._xmouse, _ymouse, true)) {
        this.nextFrame();
    } else {
        this.prevFrame();
    }
}
  1. onClipEvent (enterFrame) {
  2.     if (this.hitTest(_root._xmouse, _ymouse, true)) {
  3.         this.nextFrame();
  4.     } else {
  5.         this.prevFrame();
  6.     }
  7. }


If so the easiest fix would be to add to your if statement to check where the _ymouse position is. If it is low enough then the code gets triggered. I'm not sure of the dimensions or anything so I don't know the the Y distance is of where the actual labels of your menu stick out so this is guestimate code again...
Code: [ Select ]
onClipEvent (enterFrame) {
    if (this.hitTest(_root._xmouse, _ymouse, true) && _root._ymouse>500) {
        this.nextFrame();
    } else {
        this.prevFrame();
    }
}
  1. onClipEvent (enterFrame) {
  2.     if (this.hitTest(_root._xmouse, _ymouse, true) && _root._ymouse>500) {
  3.         this.nextFrame();
  4.     } else {
  5.         this.prevFrame();
  6.     }
  7. }
So that basically checks if the mouse is over the clip AND the _ymouse is greater than 500 pixels down from the top of the movie.
  • astone315
  • Born
  • Born
  • astone315
  • Posts: 3

Post 3+ Months Ago

thanks a bunch man, worked perfectly!
  • astone315
  • Born
  • Born
  • astone315
  • Posts: 3

Post 3+ Months Ago

Alright, well that worked, but now I have another problem along the same lines. I added buttons to those sliding menus, but the mouse still detects them when they are under the gray area. I figure that I have to put that same code, or similar code somewhere, I just can't figure out where to put it. Any help would be appreciated! Thanks
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Jeebus... lol. Ok, so as another ghettohack fix so that you don't have to recreate your menu from scratch, check out the enabled property. It allows you to disable and enabled buttons.

So in your if statement, if the statement is true then enable the buttons, else disable the buttons.
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

No wait. I thought of a BETTER idea.

Since this is playing an animation, just remove the buttons from the first (or first few) frames of animation. They don't need to be there since they aren't seen right?

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 19 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.