PDA

View Full Version : C# much like Action Script


Terro
11-18-2005, 10:32 AM
Hey guys, this only goes out to the action scripters out there. I've worked with Action Script a lot and loved the simplicity of the code, it allowed me to do tons of stuff with the flash environment. I also know a little of C++ , but I always found the code to complex and time consuming. Anyway, while trying to write a simple c++ application, I noticed that Microsoft made it's new C# ( actual name is CSharp) compiler available as a free download in its C# Express version. I said why not try the new C# code instead of C++. So I dowanload it, install it, and what do I find? It very very simple and works very much like Action Script. I think both AS and C# have been based on Java, but C# is completely Object Orianted, so there is no crazy code and classes that you have to worry about. Everything is built into the .net framework that most of us have installed on our PC's. It makes programing in windows very simple and fast.

If you remember using the standars Windows Painting Program? With c# you can create your own in about 2 hours, lol. Compile it into a EXE file and your good to give it to your friends.

If you always wanted to make your own windo based application, give this link a go and download the free C# compiler. You'll be suprized how simple they make it these days.

http://msdn.microsoft.com/vstudio/express/visualcsharp/

Evil Demon Creature
11-18-2005, 11:03 AM
Interesting, I saw the link on another message board and the real news was that microsoft was releasing all of theese express editions for free as some type of promotional deal! (offer expires next november) So grab yourselves up a few copies of some other stuff if you are into programming in those languages. (on the left side bar)

Also, I heard about C#, didn't know it was that close to actionscript. Question though: Does anyone know which would be better to learn in order to get the hang of actionscript better? C# or Java? (either way I'm going to have java learned, but I was wondering if I should step up to C# so I can get more used to actionscript's structure)

Terro
11-18-2005, 11:50 AM
Java is a great language but it runs on a virtual machine. Means that if your Pc doesnt have a java environment installed then you wont be able to run java apps. Currently C# is the same way, it needs a .net framework, but Microsoft is using .Net as the standard framework in the next Operating System thats coming out next year (Last I heard it was called LongHorn, but I think they changed the name again)

I would learn C# , because C# is strictly (OOP) - Object Orianted Programming, Java is not a Strictly (OOP) language, but is very close to it. The difference between (OOP) and (Non OOP) languages is huge. For an eample, if you were building a car in C++ you would need to build the entre car to have it work. In C# you can build a wheel, a engine, Windows, Doors, all seperate and they all have a task that they do. Then you assemble all of it into a car. You can then take your Door Object and use it in a different application. It's all about the task that needs to be done.

If you think about it in the terms of Flash. You make a image, convert it into a symbol and attach actionscript ot it. If your not happy with the Symbol, you are free to move it to a different frame or scence and it will still do the same task. Thats OOP

Only Con about c# is that it runs on the .net framework . Your applications will work on windows only. Linux and Mac .net are in the making though, so is the Next X-Box frame work. In the future your app will be able to work on all these systems as well as co work with other applications written in different languages as long as they all meet the . Net requirements.

I would go with C#, you will be ahead of the market and have a bigger audiance then Java. But java is great too.

Evil Demon Creature
11-18-2005, 09:35 PM
Well like I said, I'm going to have to learn Java either way. (it's the subject of my freshman Computer Science class) And I already know most of it. Ironically it's helped me with flash about as much as it's hindered me. I know a lot of the actionscript framework, but I'm having a real hard time getting used to the OOP environment flash brings up, and how to use it in the best way possible (plus the fact that I lose track of objects easily in flash due to the "convinience" of not having to insantiate my objects or list their data type upon declaration... but that's another topic for another day) I'm thinkinking if I can start learning how to build structures in a language more strict in the OOP department, then I can get a better feel about how I can use Flash's OOP format to make my programs/games as effecient/easy to manipulate as possible.

And considering I'm getting a degree in comp science, I'm sure the better grasp of flash would be the smallest of the benefits I'd get from studying C#. Thanks for the advice.