Hi,
I was sort off slightly off the mark with my example, but having
read up on "function closures" in AS3 I can sort of see what Anthony
means...
From what I gather, "Function Closures" in AS3 are any functions /
methods, but people generally mean functions outside of classes when
they talk about "function closures", so my example was sort of there
somehow..
Anyway, you may need "global" functions and package functions - I
guess these would be considered okay by most OOP people, whereas some
people may shun timeline code, although you can use it in AS3 and you
can do some very quick tests with it.
Like I said before, it's down to choice and whether it suits your
needs, so if you need to nest functions, or whatever, it might be easier
and more efficient to do so, it might not - depends on your brief/spec I
guess.
Sometimes just writing functional code is really nice and
therapeutic for me, but it never seems to scale very nicely beyond a
certain point (probably because I have "learned" too much about classes
and objects to go back).
Glen
Merrill, Jason wrote:
JS style Function scope instead of classical oop.
You mean like button.onRelease = function() { trace("hello from " +
this);
(I know that was said tongue in cheek, so this is not a criticism...)
that's going back to AS1/AS2 anonymous functions - why would anyone in
their right mind, unless they had to target earlier versions of
Actionscript, want to go back to that?
Jason Merrill
Bank of America Global Learning
Learning & Performance Soluions
Monthly meetings on making the most of the Adobe Flash Platform -
presented by bank associates, Adobe engineers, and outside experts in
the borader multimedia community - join the Bank of America Flash
Platform Community (note: this is for Bank of America employees only)
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
--
Glen Pike
01326 218440
www.glenpike.co.uk <http://www.glenpike.co.uk>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders