Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 08-13-2007, 09:08 PM   #1
Qutaibah
Senior Member
 
Join Date: Feb 2002
Location: Eugene, OR
Posts: 235
Default MOUSE_OUT question

hello all,

I am having a problem with the MOUSE_OUT event. I have a Sprite which contains four instances of a movClip. the four instances are arranged in a vertical configuration much like a list. there are not spaces or over laps between the four instances. I want to register a listener with the containing Sprite. some this like this:
Code:
container.addEventListener(MouseEvent.MOUSE_OUT, trigger);
contrary to what I am trying to achieve, right now, the listener is triggered every time the mouse rolls out of each of the instances inside the "container" Sprite.

i tried have been experimenting with event phases but thats not work either. Any idea how that could be achieved? Any help would be greatly appreciated.
Qutaibah is offline   Reply With Quote
Old 08-13-2007, 09:15 PM   #2
dr_zeus
Feathers
 
dr_zeus's Avatar
 
Join Date: Mar 2005
Location: Silicon Valley
Posts: 1,999
Default

You're seeing this behavior because mouse events bubble. In other words, they dispatch up the whole display list. If you need to listen to events specifically from the container Sprite, you should do it one of two ways.

1) Check the event's target to be sure it is the container Sprite. If it's from one of the children, ignore the event.

2) Set mouseChildren to false on the container Sprite.
__________________
Josh Tynjala | Feathers
dr_zeus is offline   Reply With Quote
Old 08-13-2007, 09:17 PM   #3
senocular
six eyes
 
senocular's Avatar
 
Join Date: Jan 2003
Location: San Francisco, CA (USA)
Posts: 7,875
Send a message via ICQ to senocular Send a message via AIM to senocular Send a message via MSN to senocular Send a message via Yahoo to senocular
Default

see
http://www.kirupa.com/forum/showthre...52#post1948052
__________________
(6)
senocular is offline   Reply With Quote
Old 08-13-2007, 09:19 PM   #4
dr_zeus
Feathers
 
dr_zeus's Avatar
 
Join Date: Mar 2005
Location: Silicon Valley
Posts: 1,999
Default

Ah yes, I always forget to mention ROLL_OVER and ROLL_OUT. Senocular to the rescue.
__________________
Josh Tynjala | Feathers
dr_zeus is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
question regarding layer jungyung ActionScript 1.0 (and below) 2 10-02-2006 10:57 AM
3 specific question about forms k_os Components 3 03-28-2005 05:35 PM
Multiple answers to 1 question in Flash Quiz? milohound ActionScript 1.0 (and below) 8 02-20-2005 11:11 PM
[AS1] Swapdepth using txt files and dynamic content for game. superbnerb Gaming and Game Development 3 09-22-2004 07:27 PM
Game "Time Delay" after question is answered kunafish Gaming and Game Development 1 07-29-2002 07:04 PM


All times are GMT. The time now is 03:05 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.