I've been working mostly in Javascript for the past little while, and over the winter break, I thought maybe I'd take the time to look at Flash again. Although I think Javascript is the future of front-end web programming, I still just really like Actionscript as a language. All the problems I felt AS2 had were resolved with AS3. It's really just a pleasure to work with a lot of the time, and since I wanted a fun little project to do, I decided to forget about futureproofing the code for a bit and I just wanted to have fun making something.
So, I made OrbitalMechanics: a planetary physics simulator written in Actionscript 3. Click to start adding new masses (first click sets position, second sets mass, third sets velocity.)
Basically, it is an application of various parts of the Grade 12 physics curriculum. Gravitational force is calculated using the formula F = (G * m_1 * m_2)/(d^2), where G is the arbitrary number 100, masses are in arbitrrary units where mass = 1 is comparable to a small asteroid, and distance is measured in Flash units. When two bodies collide (when the distance between them is less than the sum of their radii), they are replaced with a single body with their combined mass. The resulting body’s velocity is found assuming it is a perfectly inelastic collision using the formula m_1 * v_1 + m_2 * v_2 = (m_1 + m_2) * v’.
I decided to make this in FlashDevelop, an open-source Flash/Flex IDE. Flash Professional feels to me to be a little weird to work with, having become used to IDEs for other platforms, so I wanted to use something a little more similar to a traditional development environment. I could have used Adobe's Flash Builder, but I decided to try the free an open-source alternative, and I actually quite like it. Once I got it up and running, I actually had no complaints with it. It has all the useful code writing features that Flash Pro does, plus some, while also being more reliable (have you ever found that code completion in Flash just stops happening for seemingly random intervals? Doesn't happen in FlashDevelop.)
I didn't fully escape Flash Pro, though. I opened up Flash at the beginning and created the little menu you see in the bottom left of the screen and added it to the library. Once that was done, I exported a SWC from Flash and added that to FlashDevelop's library and I was good to go. Basically, I was fully satisfied with my FlashDevelop experience and if you like using editors more similar in style to Visual Studio or Code::Blocks or Brackets or something like that, FlashDevelop is free and a great option.
So that's that. Hopefully it's kind of fun to play with. You can find the source on GitHub if you feel like taking a look at it.
As far as other updates go, I'm still not planning on doing any more animations for a bit. I've got all my university applications in and I'm waiting to hear back from a few still, but that's basically settled. Right now I'm just trying to get through school and deal with other personal problems and hope the depression medication kicks in a bit eventually. Everything will probably be ok soon enough though.
</dave>
MSGhero
FD's code completion does poop out sometimes, but only in specific circumstances.
Pahgawk
Right. Overall I've found it to be pretty stable though. I'm impressed anyway.