  | |  | RE: Custom Class and MovieClip Event Handler Scope | RE: Custom Class and MovieClip Event Handler Scope
2004-02-19 - By Chris Spencer
Back Thanks Keith/Richard,
I 'd tried tracing xPosition and found that it returned the dreaded
'undefined '! I also tried your suggestion of placing the _parent path in
front of the variable and this doesn 't work. Having to know the path to the
containing class seems like a bit of a cludge anyway. I 'd assumed that since
a callback function was being written as a method of my class it should have
access to my instance variables.
I 've had a re-think on this whole approach to be honest as i 'm having so
many issues with referring to variables outside the scope of the callback
function (when the callback is inside a class definition) that working in
this way with classes is just not happening. I 've just used the old
fashioned ways (although there 's a lot of code repetition going on).
If anyone else can shed any light on this or suggest a workaround i 'd be
really grateful. I tried using listeners and EventDispatcher() but couldn 't
get this working in this context either.
Cheers.
Chris.
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Supported by Fig Leaf Software
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Be sure to check the archives and the wiki:
http://chattyfig.figleaf.com/
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:104729
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe send a blank e-mail to:
Normal Mode: flashcoders-unsubscribe@(protected)
Digest Mode: flashcoders-digest-unsubscrive@(protected)
|
|
 |