Chris,

AS3 supports method closure. This assures that every method and function is 
always executed in the scope where it was defined. Here is a simple example:

function doIt(){ trace(this) }

a = new Object()

a.b = doIt

a.b() //doIt is executed in the scope where it was defined not within ‘a’

Even using reference to a function, the executing function/method is always in 
the scope where it was originally defined.

When you listen for events, you can simply pass a reference to a method within 
an instance and the event will be called in the scope of the instance.

It makes life so much simpler!

Cheers,

Cynergy Systems, Inc.
Theodore Patrick
Sr. Consultant
[EMAIL PROTECTED]
tel: 1.866.CYNERGY
http://www.cynergysystems.com

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.1/291 - Release Date: 3/24/2006
 


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to