MovieClip(root)
MovieClip(root).doStuffLikeNormal_rootInAS2
This is what makes AS3 still programmable, but I wish they wouldn’t force you to cast it to MovieClip. That’s just stupid. More and more as I program with AS3 it feels like it’s full of poor choices of syntax. I mean, why do you have to do that whole addEventListener every time that you want to make a simple button? I understand that they’re trying to centralize code, but come on. Sometimes if its just a tiny function, it’s BETTER to have it on a button isntead of clogging up the main frame.
Why did they take away var on textboxes? Why did they take away eval? Meh…
Posted by in 22:07:15
Why do you insist on learning AS3 if none of it is the way you like?
AS3 isn’t about being more centralized (ie on the frame) its about follow ECMA specifications as to what an object oriented programming language should be so its easier for ‘real’ programmers to pick up. The overall idea is that AS3 will be like Java/c++ to hopefully lure some of Java’s web development applications into the flash enviornment and soon into Adobe Runtime environment (which is very similar to JRE). It also allows programmers from C++ to more quickly develop flash games and apps without having to learn a silly language that doesnt seem to have been thought out prior to design.
Also, a lot of the syntax choices made allow the Flash player to run much faster. [Assumption Time: I think when you add functions and variables to the frame that flash is probably extending the root class into a new class with your newly defined data. So when you call root you are refering to the root as an instance of 'root' class not as your newly extended class, thus flash cant find your function as they aren't in root. This follows basic OOP design.]
I scecond the comment bitch before me said.