I’ve spent this morning trying to get ASDoc to generate code documentation for the JASPA APIs, with mixed results.
Continue reading…
Tag Archives: AS3
Eulogy
Or, “why I haven’t done any Flash work for a year”
I effectively gave up Flash when I came to Public and it’s now a whole year since I did any significant Flash work. In this short time AS3 has really come of age, there are tonnes of serious libraries, from fractals to physics, and PaperVision 3D seems almost omnipresent. The prospect of going back to the ActionScript freelance circuit after a year on the wagon would be quite daunting. Continue reading…
The law of leaky abstractions
I’m suspicious of people who don’t enable commenting on their blog – that just makes it a book. But this gripe aside, I like what Joel Spolsky has to say about abstraction in modern programming. Well, it pushes one of my buttons; perhaps “like” has nothing to do with it.
Sadly the people I feel need to appreciate his point the most probably won’t get past the second paragraph. That point, or at least the one I took away from it, is best summarized by this quote:
“[…] as we have higher and higher level programming tools with better and better abstractions, becoming a proficient programmer is getting harder and harder.”
JavaScript Method Closures
I was further convinced this week that the world needs JASPA when my Flash developer colleague asked me about closures in JavaScript. He’s been knee-deep in AS3 for almost a year, so JavaScript must seem rather weak now.
Unlike JavaScript and AS2, AS3 supports method closures implicitly; so I made sure they were built into the JAS language. Such a thing is not native to JavaScript so the JASPA compiler automatically generates a call to helper function jaspa.closure
whenever an object’s method is referenced.
If you’ve ever used Delegate.create
in AS2, then you’ve encountered this issue. If you don’t see the problem, consider this example in JavaScript:
Continue reading…
ActionScript Emptiness
I’m a great believer that if you’re going to be good at something you should understand it a the lowest level possible. Every ActionScript developer I talk to at the moment is migrating to AS3 and mostly we talk about all the high level differences it has with AS2; the API, the event mechanism and so forth. But let’s not forget the little things. It’s often complacency toward the smallest components that cause the most trouble. It seems like an odd situation to know how to flip a cube around in 3D space, but not really know the difference between null
and undefined
. This is a real situation though, and it can mean bugs deep in complex layers of code just waiting to ruin everything. Continue reading…
Scale & rotate around an arbitrary centre
The mini project I picked as my first dip into AS3 was a short example that I had been planning for this blog, so here it is in AS3, instead of AS2 as I had originally planned.
The South Park Chin balls Flash app required that the user drag and zoom a loaded photo. Anyone who’s ever done this will know that you can’t just scale the picture around it’s registration point when you zoom. Why? because the centre point changes as you pan the image around. So the requirement in a nutshell is – to be able to scale a MovieClip around an arbitrary centre.
Sure, you could take the Russian doll approach with multiple clips inside clips, but that just ain’t cool! I thought I’d share the way I did it as it’s pretty concise. Continue reading…
AS3 Migration – Day 1
Much later than planned I finally got around to checking out AS3.
I was quick to upgrade to AS2 when it came out in Flash MX 2004, and never looked back, so why so late? Well, as usual, because I’m busy. Busy on a PHP project at that, so I haven’t really had the chance. Plus, if I do have to write some AS on the job it’s too big a risk to start learning something new. Pressures demand that I get on with it as I know how. That’s why this Facebook application has it’s main Flash app (Chin Balls) written in AS2. Also, I view the upgrading of a programming language as a one-way process. I didn’t upgrade to PHP5 until I was confident I would never have to write PHP4 again. And with AS3 this is an even bigger deal. Continue reading…
AS3 – The gap widens
The designer/developer boundary has always been a little blurry when it comes to Flash. Flash has been celebrated for this since 1999, and has established a pretty unique position. But with each release of Flash those who sit on the fence feel an increasing pressure to choose a camp and stay in it. Some do, some don’t and some just carry on doing things as they always did, but one thing’s for sure; that the drive toward Flash being a more robust, more powerful, more serious platform is not showing any signs of slowing down. AS3 is another leap forward. In fact a much bigger leap than AS2 was. Continue reading…