This is a discussion on "HitTest - Tell an outside MovieClip to go to nextFrame()" within the Flash & Multimedia Forum section. This forum, and the thread "HitTest - Tell an outside MovieClip to go to nextFrame() are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
HitTest - Tell an outside MovieClip to go to nextFrame()
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
HitTest - Tell an outside MovieClip to go to nextFrame()
I am trying to have a animated rollout sub-menu for a menu, and figured using the onClipEvent / hitTest code would work well. My dilemna is that I want the menu rollout to include a fading in of a full screen photo, so I added the animation of the photo to the menu's movieclip. However, once the photo fades in, it is then part of the MovieClip hitTest area, so it won't let the mouse "rollout" of the movieclip (as the mouse is always over the photo, which takes up the whole flash area).
I came up with two possible solutions to solve the problem, but I need help with the coding: 1. Is there a way to define the hit area specifically to be just the menu part of the MovieClip (and disregard the space area that the photo occupies)? or 2. Move the Photo animation into it's own MovieClip and then use the hitTest code to call the photo's MovieClip and tell it to do the same thing. Is this possible? This seems the better solution if doable. Here's my attempt at coding this second option - but it doesn't work when I test it. Any ideas on how to make it work? The MovieClip of the photo animation has an instance name of "DiningRoom". Here is the (nonworking) code: onClipEvent (enterFrame) { if (this.hitTest(_root._xmouse, _root._ymouse, true)) { this.nextFrame(); } else { this.prevFrame(); } } onClipEvent (enterFrame) { if (this.hitTest(_root._xmouse, _root._ymouse, true)) { this.DiningRoom.nextFrame(); } else { this.DiningRoom.prevFrame(); } } Thanks for any help! |
|
|
![]() |
| Tags |
| hittest |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MovieClip and Next Frame | bunty07 | Flash & Multimedia Forum | 4 | Nov 8th, 2007 18:22 |
| hitTest | tox0tes | Flash & Multimedia Forum | 1 | Sep 20th, 2007 21:56 |
| hitTest problem | magnetica | Flash & Multimedia Forum | 1 | Sep 3rd, 2007 23:03 |
| HitTest issues | Flashist | Flash & Multimedia Forum | 2 | Feb 25th, 2007 03:03 |
| Movieclip Control | dazzelworks | Flash & Multimedia Forum | 3 | Oct 30th, 2006 13:11 |