phaedrus,
You will find that, in the beginning, the hitTests will use up less
processor (better performance). The examples you have below, for example.
However, if you program all the logic you'd need to behave exactly as the
other method (keeping track of all the details, etc) you'll quickly begin to
match the performance and it may end up not being worth the time and bugs
anymore. I still want to build a hitTest solution, mostly for my own
enjoyment, that will at least have equal performance if not better. But it
becomes harder for other developers to work with non-standard inventions,
cool as they may be, and eventually people just get frustrated with your
code.
If it's just for you or you don't plan and building a full mouse-behavior
replacement, try experimenting with _dropTarget ... there's some
possibilities there ;)
good luck,
Tyler
On 5/17/06, phaedrus <[EMAIL PROTECTED]> wrote:
Does anyone know if there is a performance difference between hitTest and
onRollOver/onRollOut?
For instance, if I had 100 movie clips on a lower-spec computer, would
there
be a notable processing difference between these two approaches:
myMC.onMouseMove = function() {
if(this.hitTest(_root._xmouse,_root._ymouse,true)) {
trace("Roll Over");
} else {
trace("Roll Out");
}
}
Or
myMC.onRollOver = function() {
trace("Roll Over");
}
myMC.onRollOut = function() {
trace("Roll Out");
}
I've also got some concerns regarding using _root._xmouse (etc) based on
the
comments at:
http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/js/html/wwhelp.ht
m?href=Part4_ASLR2.html
but I've not yet looked to deeply into working around it (presumably by
not
using _root). However, if anyone knows that the situation is
unresolvable,
that'd be good to know.
- phaedrus
_______________________________________________
[email protected]
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
_______________________________________________
[email protected]
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