HitTest - Tell an outside MovieClip to go to nextFrame()

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.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old May 10th, 2007, 02:03
New Member
Join Date: May 2007
Location: Denver
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old May 16th, 2007, 22:20
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: HitTest - Tell an outside MovieClip to go to nextFrame()

You should be able to edit the down state of the buttons and "draw" your hit area to wherever you want it.
Last Blog Entry: Yay!? (Oct 8th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
hittest

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 23:25.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42