OOP in flash

Subscribe to OOP in flash 4 posts

Sign in to reply


 
avatar for Salman Salman 26 posts
Flag Post

Hey,

I am a C++ / UML guy, and am new to Flash. I’m making my first flash game, and am using CS3 but with AS2.0 to be able to target my game for stuff like the Nintendo Wii and Kongregate APIs. Clearly AS 2.0 has severe issues with regards to their OOP, and frankly I cant stand it much, so I am very pleased with the design of AS 3.0. However, I would really like to understand how OOP is implemented by the Flash Player. In particular, I am curious about how it handles the virtual function dispatching and also how differently must I think of Flash OOP from my existing C++ knowledge (e.g, in C++ I may try to ensure that the compiler will not generate the vtable for a certain class, but perhaps such an optimization is meaningless in Flash?).

Thanks,

Salman

 
avatar for dazzer dazzer 724 posts
Flag Post

If you know Java, you will find many similarities with AS3.0

I’m not experienced with C++, so I can’t say much. But you should expect higher level memory management like you’d find with Java. None of that pointer stuff. ^^

 
avatar for fucrate fucrate 61 posts
Flag Post

well, really, its more like everything is a pointer

 
avatar for Chalain Chalain 21 posts
Flag Post

If you want to monkey around with runtime reclassing and stuff like that, you want to look at the Reflection API in ActionScript 3.0; it’s as close as I’ve been able to get to that sort of thing. I get the impression that the Flash VM doesn’t let you pry open the hood very much, so finding out the virtual table implementation details may be quite tricky.

Sign in to reply