? on C++/Flash on Structures

13 posts

Flag Post

Ok, well if neone knows how to program in c++, then i have a simple question. What is the best way to set up a structure in flash that has the say usage as it does in C++? and if u dont program in C++, then im wondering what the best way to create, say a mc that has attributes, like hp, strength, dex, int, charisma, and so on with out getting hella complicated. ok thx

ShakeNBake

 
Flag Post

The best way is to code in ActionScript 2 using OOP by utilizing Classes. I dont know how much experience you have, but its not the simplest thing if you dont understand OOP yet. If you do, then it makes it easy and its the most versatile.

http://www.kirupa.com/developer/oop2/AS2OOPindex.htm

 
Flag Post

If you understand OOP you should be running as fast as you can, away from AS2. Head straight to AS3 and do yourself a favour.

 
Flag Post

Unless you want to do commercial projects. Many clients will still be restricted to AS2 for awhile.

 
Flag Post

Essential Actionscript 2.0

If you already know a little actionscript and are open to OOP you will probably find this book very helpful.

 
Flag Post

Looking at our internal stats Flash 9.0 adoption is very good — approaching 90%. Given the performance improvements I bet clients will be willing to go for AS3 sooner rather than later. Of course the older, less savvy their audience is the longer the AS2 requirement will stick around…

 
Flag Post

Yes the adoption is getting there, but a lot of clients still tend to stay behind awhile. Some have barely moved from Flash 7 to Flash 8. As of March, worldwide stats set version 9 from 65-83% but version 8 is at 86-96%, so that little difference can effect the choice of many companies.

I always push for the newer stuff if the penetration rates are good, but that doesnt always work.

 
Flag Post

As soon as Director will support Flash 9 files I will transition everything I do to AS3.

Honestly the penetration of the Flash 9 player (84% in the US as of March 2007) and the speed it has achieved that (36% in September 2006) is truly incredible!

Penetration Statistics From Adobe

 
Flag Post

The best way is to code in ActionScript 2 using OOP by utilizing Classes. I dont know how much experience you have, but its not the simplest thing if you dont understand OOP yet. If you do, then it makes it easy and its the most versatile.

http://www.kirupa.com/developer/oop2/AS2OOPindex.htm


I just read that, and I thought the conclusion was funny.

So there ya. ActionScript 2.0. Was it all you had hoped for and more? Yeah, I expected more as well. You have to think about it though. Macromedia cannot very easily pull drastic overhaul on its Flash player – one of the, if not the most widely distributed web plug-ins in the world. An entirely new programming environment would require a new runtime environment which would mean Flash really wouldn’t be much of Flash anymore. Then the plug-in would have to basically provide two players – one for the new Flash environment and one for the classic environment. It doesn’t seem like Flash is about to jump ship and head in that direction just yet.

Sound familiar?

 
Flag Post

thx for staying on topic guys, but yeah, thx for the tip, im not too experienced with OOP so ill look into it.

 
Flag Post

I just read that, and I thought the conclusion was funny.

So there ya. ActionScript 2.0. Was it all you had hoped for and more? Yeah, I expected more as well. You have to think about it though. Macromedia cannot very easily pull drastic overhaul on its Flash player – one of the, if not the most widely distributed web plug-ins in the world. An entirely new programming environment would require a new runtime environment which would mean Flash really wouldn’t be much of Flash anymore. Then the plug-in would have to basically provide two players – one for the new Flash environment and one for the classic environment. It doesn’t seem like Flash is about to jump ship and head in that direction just yet.

Sound familiar?


What on earth is your point?

 
Flag Post

I just wanted to respond to the original question really quick. Shake, a C++ struct is very similar to an Object in many ways. You can even get away with making an Object and treating it sort of like a struct… however you will not be taking advantage of the entire Object Oriented Paradigm. What you want to do is create a class that contains variables as you would a struct and then create “accessor” methods in order to get to the variables. You CAN get around this by making the variables public, but it is unadvised and ultimately.. I think.. you will come to understand the value of encapsulation. If you have any questions just ask. Also, feel free to take a look at some of the classes I created for ch00se_JukeBox.

 
Flag Post

“What on earth is your point?” (how do you quote the reply?)

I think the point was that is exactly what happened with the Flash 9 player… it is basically two players (one for pre-9 flash and one for Flash9). The linked article was written shortly after Flash 8 was released.