1 msg[JOB] Flash Developer/Consultant, Washington,D....
2 msgSelection Box
5 msgTracking User progress through a presentation.
1 msgSound changes in AS 3
8 msgDetecting Rollover w/o onRollOver
14 msgfinding out which fonts are embedded in a swf a...
2 msgFlash Lite 2.1
2 msgchecking microphone
5 msgExtending List v2 component
1 msgStop Flash caching classes (Pedr)
1 msgLead Developer - Central London
1 msgun subscribe
4 msgAsteroids sluggishness, optimization?

determining which object is displayed at a give...
\ Vishal Kapur (6 Feb 2007)
. \ Erik Bianchi (6 Feb 2007)
. . \ Vishal Kapur (6 Feb 2007)
. . . \ Mike Mountain (6 Feb 2007)
. . . . \ Vishal Kapur (7 Feb 2007)
. . . . . \ Alain Rousseau (7 Feb 2007)
. . . . . . \ Vishal Kapur (7 Feb 2007)
. . . . . \ Erik Bianchi (7 Feb 2007)
. . . . . \ Karina Steffens (7 Feb 2007)
. . . . . . \ Jason Boyd (7 Feb 2007)
. . . . . . . \ Vishal Kapur (7 Feb 2007)
. . . . . . . . \ Karina Steffens (8 Feb 2007)
. . . . . . . . . \ Vishal Kapur (8 Feb 2007)
. . . . . . . . . . \ Joshua Sera (8 Feb 2007)
. . . . . . . . . . . \ Karina Steffens (8 Feb 2007)
. . . . . . . . . . \ Erik Bianchi (9 Feb 2007)
. . . . . . . . . . . \ Steven Sacks | BLITZ (9 Feb 2007)
. . . . . . . . . . . . \ Vishal Kapur (9 Feb 2007)
. . . . . . . . . . . . . \ Steven Sacks | BLITZ (9 Feb 2007)
. . . . . . . . . . . . . \ Erik Bianchi (9 Feb 2007)
. . . . . . . . \ Erik Bianchi (9 Feb 2007)
. . . . . . . \ Karina Steffens (8 Feb 2007)
. . . . . . . \ Erik Bianchi (9 Feb 2007)

7 msgScrolling text with dragger??
3 msgbitmap RLE example
5 msgStop Flash caching classes
2 msgCalendar - Datechooser component - how to
1 msgBroken swf with scale: none on lines?
1 msgProjector for Linux?
Subject:RE: determining which object is displayed at agivenpoint
Group:Flashcoders
From:Erik Bianchi
Date:9 Feb 2007


 
I think he is referring to the following class from another thread. One
problem pertaining to your issue is that it doesn't take into consideration
depth. It is still more process intensive then just firing a callback on
rollOver but could be useful for you and give you some ideas:

class com.domain.RollWhileWithin extends MovieClip {
public var rolled:Boolean;

function RollWhileWithin ()
{
rolled = false;
}
public function doRollOver():Void
{
if (!rolled) {
rolled = true;
gotoAndStop("over");
}
}
public function doRollOut():Void
{
if (rolled) {
rolled = false;
gotoAndStop("up");
}
}
}




One level above it, you can manage as many clips as there are.

var checkMouseInterval:Number;
clearInterval(checkMouseInterval);
checkMouseInterval = setInterval(this, "checkMouse", 100); private function
checkMouse():Void {
var i:Number = 5;
while (i--) {
var clip:MovieClip = this["MC_RollClip" + i];
if (_xmouse > clip._x && _xmouse < clip._x + clip._width &&
_ymouse > clip._y && _ymouse < clip._y + clip._height) {
clip.doRollOver();
} else {
clip.doRollOut();
}
}
}

-----Original Message-----
From: flashcoders-bounces
[mailto:flashcoders-bounces] On Behalf Of Vishal Kapur
Sent: Thursday, February 08, 2007 11:19 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] determining which object is displayed at
agivenpoint

Ok. This is what I was missing. Thanks to Karina and Erik for
pointing out that you need to compare the entire parent chain of two
objects to figure out which one is being rendered above the other.

The only thing to add is that in addition to checking depths, the
_visible property needs to be checked for the parent chain for each
object (so if _visible is false anywhere in the parent chain, I
consider that object to be invisible). This works in all cases except
for some TextFields, where the bounding box of the textfield object is
bigger than the area actually occupied by the text. This can be
solved with a custom hitTest() implementation that uses
Textfield.textWidth and .textHeight to get the bounding box of the
displayed text. An interesting corollary is that this method would be
a way to implement onRollOver for TextFields (if that ever proves
useful to anyone).

Steven, I'm not familiar with the class you're referring to. Could
you send the link to it? I'm always looking to improve the simplicity
and efficiency of my code...

-- Vishal


On 2/8/07, Steven Sacks | BLITZ <ssacks> wrote:
> I think the class I wrote works well enough, I actually pulled it out of
> an app I'm working on with complex rollovers like that. Why not
> consider my way? It's simple, easy and, most importantly, it works. It
> hardly takes any processing power, too.
>
>
> _______________________________________________
> Flashcoders
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
_______________________________________________
Flashcoders
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


_______________________________________________
Flashcoders
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


© 2004-2008 readlist.com