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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Nested Movie Clips with Rollover Events

Status
Not open for further replies.

Terwin

Programmer
May 23, 2002
51
US
Below are two situations which I believe have a similar answer.. I just don't know what that answer is and would love to hear from someone who does.

#1 Control bar movie clip has a rollover event where it maximizes itself on rollover, and minimizes itself on rollout (so as to be unobtrusive). The bar has buttons on it however, that are subject to their own over/out/press events.

#2 A dynamic text box is draggable with onPress, but contains a scroll bar component within its clip to scroll the text.

In each case, when the parent clip (control bar/text box) has its rollover enabled, it seems to override the mouse events of its child objects (control bar buttons/scroll bar). What can I do to have mouse events apply to the parent clips while maintaining the integrity of its child mouse events?

Thanks,
Terwin
 
I would say there are two ways you can fix this problem:
1. make your parent button clip (toolbar) a movie clip and use:
Code:
    onClipEvent(MouseOver) {
      if (hitTest(_xmouse, _ymouse)) // maybe _root.xmouse, _root.ymouse
       _root.maximize(); // maximizing toolbar - function is defined at _root level
      else 
       _root.minimize(); // minimizing toolbar - function is defined at _root level
    }
2. make your parent button clip a movie clip and use:
Code:
    on(rollOver) {
       _root.maximize();
    }
    on(rollOut) {
       _root.minimize();
    }
I am not quite sure #2 will work - "toolbar" would be defined as a movie clip it should allow child clips to work and "on()" commands should not overwrite that.

** I have to tested the code - so there might be some glitches, but I am fairly sure that the concept is correct...

Good luck

Simon
 
Not much to go on without code. Can you post the fla file on the web? Thanks
Tricia
yorkeylady@earthlink.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top