Aside from all the OO stuff you may need to learn, Flash is odd in
that functions can be stored in variables. I'm not sure why you would
do this in the example you gave, though it is common to say something
like:
myObject.onMouseOver = function () { ... }
where you are assigning an anonymous function to the onMouseOver
property of myObject; a property is simply a variable that belongs to
a class.
If that helps.
On 2/6/07, eric cash <[EMAIL PROTECTED]> wrote:
Okay, I'm guessing it's a stupid question, so I'll get over it asap.
I've never written a custom class before, and have recently started to
code things in Flash which are much more complex, approaching
application status, so I'm trying to wwrap my head around all of this
OOP stuff. I keep running into something that I can't get though...
using the VAR keyword when declaring event handlers, like this example
from Object-Oriented Actionscript for Flash 8:
var onEnterFrame:Function = doSomething;
I've Googled my [EMAIL PROTECTED] off, and I can't get it to save my life, and
this
seemed like the best place to ask. Will one of you take a couple
minutes out of your day to help a poor guy out?
Thanks
ec
_______________________________________________
[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