Mailing List
Home
Flash Pro
Extending Flash
Flash Macromedia Developer
Subjects
Firework Effect
setInterval bug identified and fixed
setInterval bug identified and fixed
ScrollPane component doesn 't auto update
Help: MX 2004 How to script a print button to print the entire sli
Event Dispatcher between classes
memory management removeMovieClip /
MX2004 Dataset itemClassName
Order of events per frame
XML to Object help
Textfield prototype question
Flash and QuickTime VR
Reading and displaying RSS feeds in Flash MX
Flash MX 2004 Sucks
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash Interface with 10mb xml file
Web Service Results
Listener Object 's best practice
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
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)