Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 29th, 2011, 07:02 PM
Tuskony Tuskony is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2005
Posts: 43 Tuskony User rank is Sergeant Major (2000 - 5000 Reputation Level)Tuskony User rank is Sergeant Major (2000 - 5000 Reputation Level)Tuskony User rank is Sergeant Major (2000 - 5000 Reputation Level)Tuskony User rank is Sergeant Major (2000 - 5000 Reputation Level)Tuskony User rank is Sergeant Major (2000 - 5000 Reputation Level)Tuskony User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 10 h 42 m 58 sec
Reputation Power: 32
ActionScript 3 - Scroll Panes and Mouse Events...

Hey Guys,

I have another problem with my scroll pane.

I now have a bunch of Loader objects that are used to display thumbnail images in a scrollpane. I want to add a MouseEvent.ROLL_OVER event so that when I a person rolls over an image there will be some buttons displayed, IE a remove button so the user can delete an image from the gallery.

However my ROLL_OVER and ROLL_OUT events are firing like CRAZY when I place my mouse over a picture. Right now I have the roll over and roll out events set to just hide the image (so I know that it's working). But all that happens is the image flashes....

here is the code...

Code:
var L : Loader = mThumbs[i].mLoader;
L.addEventListener(MouseEvent.ROLL_OVER, onMouseOverThumb);

....

public function onMouseOverThumb(event:MouseEvent) {
	var thumb : Loader = event.target as Loader;
	thumb.visible = false;
	thumb.removeEventListener(MouseEvent.ROLL_OVER, onMouseOverThumb);
	thumb.addEventListener(MouseEvent.ROLL_OUT, onMouseOutThumb);
	trace("called mouse over....");
}
		
		
public function onMouseOutThumb(event:MouseEvent) {
	var thumb : Loader = event.target as Loader;
	thumb.visible = true;
	thumb.addEventListener(MouseEvent.ROLL_OVER, onMouseOverThumb);
	thumb.removeEventListener(MouseEvent.ROLL_OUT, onMouseOutThumb);
	trace("called mouse out....");
}


So my question is how come my image is flashing!?

Reply With Quote
  #2  
Old May 29th, 2011, 07:09 PM
Tuskony Tuskony is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2005
Posts: 43 Tuskony User rank is Sergeant Major (2000 - 5000 Reputation Level)Tuskony User rank is Sergeant Major (2000 - 5000 Reputation Level)Tuskony User rank is Sergeant Major (2000 - 5000 Reputation Level)Tuskony User rank is Sergeant Major (2000 - 5000 Reputation Level)Tuskony User rank is Sergeant Major (2000 - 5000 Reputation Level)Tuskony User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 10 h 42 m 58 sec
Reputation Power: 32
nevermind I'm st000pid.

The image is flashing because when I call thumb.visible = false it's automatically forcing a mouse out event which then brings the thumb back into view and the cycle repeats!

Sometimes the most simple problems can cause headaches :P

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > ActionScript 3 - Scroll Panes and Mouse Events...

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap