Types in AS3: ints not so fast, uints slow!

UPDATE: These findings are not relevant in more recent versions of the player. Please see this article for more recent results, and to run the tests for yourself.


Sho just posted a really interested article on why he won’t be using the int data type very frequently in ActionScript 3. Up until reading it, I had believed that as in other languages, there were large performance benefits to using ints and uints appropriately in AS3. Turns out that isn’t the case.

I did some quick testing on this, which confirm Sho’s assertion that int is only slightly faster than Number in ideal circumstances, but the results from uint were much more surprising.

Continue reading →

Mactel and Adobe, One Week Later

It has been about a week since I got everything set up on my new MacBook, and I thought I would write up a quick post to let everyone know how things are going with the new system.

Hardware setup

First, let me briefly describe my setup. For hardware, I have my new white 2.0ghz MacBook, with 100GB HDD and 2GB RAM. I connect it to a 23″ Apple Cinema Display at home, and a 17″ Sony LCD at the office with monitor spanning between the MacBook screen and the external monitor (ie. two monitor setup, not mirrored). I also use an external mouse/keyboard in both locations. I chose to keep the larger display at home because I tend to handle a lot of managerial / business stuff at the office, and do more intensive coding at home. As with all Macs, the MacBook does a perfect job switching between different monitors and peripherals, remembering resolutions and settings for every location. A docking station would be nice, but I can live with plugging in 3-4 cables (power, monitor, USB, audio) at each location.

Software setup

For software, the MacBook is running Mac OS 10.4.6. I have Flash MX, 2004, and 8 installed for Mac, as well as PhotoShop and the Mactel native Flash Player 8. Using Parallels virtualization software, I am also running Windows XP Pro SP2 with Flash 8, FlexBuilder 2 and the Flash Player 9 beta. I would definitely recommend reading the at least the Quick Start guide if you plan on installing Parallels VM – not all of the options are entirely straightforward.

Continue reading →

Adventures with Adobe and an Intel Mac – Part 1

I recently decided to purchase an Intel Macintosh for my main work system, despite there being no native binaries for the software that I use most often: Macromedia Flash and Adobe Photoshop. There was a few reasons I decided to take this plunge:

  1. My 12″ 1ghz Powerbook was far too underpowered to do daily work on, or even to use for training / presenting at conferences.
  2. I work at home, the office, and while traveling. I was sick of trying to synchronize 3 computers, and more than a little bit worried about overwriting the wrong file.
  3. There was no way I was going to shell out major coinage for a new powerbook that wasn’t using the newest processors.
  4. Bootcamp/Parallels should (more on that later) let me run Windows versions of the software I need when I require good performance.
  5. The new Macbook is just a ridiculously good deal in terms of price/performance/features, especially by Apple standards.

Continue reading →

Playing With Yourself… in Paris

I’m thrilled to be participating in the Web Flash Festival at the infamous Pompidou Centre in Paris this Saturday. I will be involved in a number of ways. I will be giving a talk entitled “Playing With Yourself (for fun and profit)” about the professional benefits of doing experimental work, and exploring the foundation of how my webcam experiments work. I judged the experimental category, and will present the award (my first time presenting an award… I feel so glamourous). I’ll also be setting up Installation Incomplet in the Centre with some new pieces that attendees will be able to play with.

I’m really looking forwards to meeting some of the French community at this event, even with my embarrassingly poor French (parlez vous en Anglais, s’il vous plait?). I’m also looking forward to seeing André Michelle again, his work is always very inspiring.

Sandbox Errors Not Shown When IDE Not Installed

This is more a reminder for myself than anything, and to save others the half hour of grief I went through…

While setting up the Installation Incomplet at FitC, I ran into some trouble. The installation allows users to save an image of themselves playing with the experiments back to our server, and view it online, but this feature refused to work on location. I spent a stressful half hour testing everything I could think of (internet, connection to our server, etc), shuffling modified files between my powerbook and the installation PC on a USB key, before it dawned on me: It was a security sandbox error, but it wasn’t displaying any errors because I didn’t have the Flash IDE installed, just the Stand Alone player.

I remember reading about this from way back when, but it totally slipped my mind. The IDE installs a file that the player looks for to determine if it should throw (developer) errors – without this file, it just fails silently. To make things worse, all my testing had been in my experiments directory which is I’ve set up as a trusted location. Definitely something to remember if you’re deploying any Flash 8 content to other users’ local systems or doing any installation work.

Going to the advanced settings online and setting the installation SWF as a trusted file fixed things right up (although the spotty internet access largely defeated this feature in the end anyway *sigh*).

Webcam Fluid Dynamics

Conferences, installations and playing with AS3 (more on that soon) have been keeping me pretty darn busy lately, so there haven’t been many quality updates to Gallery Incomplet lately. Hopefully I get some time to post more experiments soon, but in the meantime I’ve posted a video of one of my new favourites: Webcam Fluid Dynamics.

This experiment lets you interact via the webcam with particles that behave similar to fluids. They flow downhill, get caught in bowl shapes, and are generally a lot of fun. Check it out here. I’m definitely going to play with this idea some more soon. I’m interested in tying in some kinematics to allow me to chain particles together.

Ideas abound. Time, unfortunately, does not.

Continue reading →