Archive for November, 2008

Imported image renders as big red box in Flash CS3

Thursday, November 13th, 2008

I was working with one of my students on Tuesday to create a filmstrip-style photo gallery where the user could move to the left or right of the filmstrip center and the line of photos would scroll into view. I was looking at the student’s .fla and when I tested their movie the photos appeared as a large red box in the SWF. Initially I thought there was a hidden layer that had a colored rectangle on it somewhere, but I soon discovered the problem — the filmstrip of photos was one huge jpeg, over 10,000 pixels wide.

While this is far beyond the maximum bitmap size that could be created with ActionScript (see this post by Keith Peters), the Flash IDE appears to handle images larger than this size when they are imported into the library (I’m not sure why Flash doesn’t complain. Anyone know?) — up to a point anyway. After some testing the red box seemed related to the RAM available to render a particular image in the Flash IDE, as I was not able to find a specific image size over which this behavior would be triggered. Sometimes a large image would render, then suddenly it would not. At any rate, should this happen to you, just reduced the size of the imported image.

A warning and recommendation for MacBook owners

Saturday, November 8th, 2008

In my rush to leave the country for Colombia (that really makes my life sound more interesting than it is), I inadvertently put my MacBook Pro to sleep instead of shutting it down. Two weeks later I returned. Waking it from sleep I found that the battery had become completely unrecognizable. The batteries in MacBooks need to retain a small charge to enable them to be recognized by the charging mechanism in the computer, completely draining them (such as by leaving them inside a sleeping computer for extended periods) will make them unusable. The lesson: Never put your MacBook to sleep for extended periods without power.

In my search for a way to reinvigorate my battery, I stumbled across a freeware application called coconutBattery, a great little app for getting detailed statistics on your battery. These include the battery load cycle (how many times the battery has been [almost] completely drained and recharged), the current capacity of the battery in milliampere-hours in comparison to its rated capacity and the age of your Mac. One bug I found though, it crashed looking for my dead battery, but works great for my new one!

I also wanted to mention that iStat Pro, a great general purpose system monitoring widget for Mac OS X shows the number of battery load cycles too.