Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 problems: Dragging objects and see through layers 1

Status
Not open for further replies.

Rohdem

Programmer
Sep 20, 2000
553
US
I am working on building a flash site at (go easy on me, I just started with flash about a month ago). The silver thing at the upper left on the first frame is a menu. It is a movie clip. When you click the red arrow, it opens up and you can select where you want to go. This works great except for two problems. First, I use the OnMovieClip event to call the startdrag and stopdrag so you can move the menu to any part of the screen. This works also, but when I click somewhere outside the movie clip and drag my mouse around, the menu still moves. Why does this happen. Secondly, suppose I open the menu and drag it over a link that is behind the movie clip. That link is still clickable, so this can be confusing as to what link your actually clicking on. How do I disable any links that are on the frame behind the movie clip.

I hope that made sense.

Thanks Mike Rohde
rohdem@marshallengines.com
 
Usually, the drag menus I've seen, use a button you click to drag the menu. Rather than using the OnMovieClip event, you could try setting up an invisible button (just the hit state) sized to the size of your opened menu. Then just set your startDrag & stopDrag actions to that button.

As for your second problem, would have to test it myself, but maybe adding an opaque background to your menu mc would solve it, although it would probably have to expand as the menu opens up.
Maybe loading the menu on another level might work... but not sure about that either.

;-)
 
Oldnewbie

Your first solution actually solved both of my problems.
Thanks for your help!! :) Mike Rohde
rohdem@marshallengines.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top