Imported image renders as big red box in Flash CS3

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

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.

This Halloween, don’t forget to…

October 31st, 2008

How the time flies. Four years ago I was in the kitchen of the rental house I shared with my girlfriend in Elkins, WV. As Halloween approached I thought of another occasion that comes far less often. Wielding a large knife, I carefully carved out the front of a Jack-o’-lantern, one which would be appropriate for the season. Four years later I will let that pumpkin live on in perpetuity through a photograph on the World Wide Web.

The date may have changed, but the message remains the same:

Vote!

Shout out to the <head> Conference

October 30th, 2008

I just wanted to thank Aral Balkan and everyone else involved in putting together the <head> Conference, a global web conference run over the Internet, great idea! After attending FlashPitt I had not anticipated attending the <head> Conference, but at the last moment I got a ticket thanks to the generous invitation of Steve Webster. In fact I got two invites… one from Steve and one from Aral. Thanks guys (and I only used one, I promise).

We’re published

October 29th, 2008

The ActionScript 3.0 Quick Reference Guide has been published.

We can’t take credit for writing this book, but me and my cohort Eric Kramer did help send this book to press in our capacity as editors. It is such a good book a used copy is going for more than a brand new one on Amazon :)

 

FlashPitt Recap

October 11th, 2008

FlashPitt felt like… wait, let me back up. Why did I attend FlashPitt? Well…

  • It was relatively close, at 3.5 hours driving time.
  • It was inexpensive for a Flash conference, under $200, only Athens-own Spring <br /> Conference is cheaper.
  • It had speakers I had seen and known were presentations worth attending, for example: Stacy Mulcahy, Craig Swann.

Wait, what aboot those two… they are Canadian. And there was at least one more Canadian somewhere in the speaker list. Where else would I see them both… hmmm…

Flipping through the conference program I came to the last page, which listed the conference organization Thank You’s. First on the list: Shawn Pucknell. As I had suspected, this conference had strong ties to FITC. It felt very much like a mini-FITC, which is pretty meaningless if you have never been to FITC, but I’ll just say FITC is a well-run, fun conference with great networking opportunities.

Through one attendee I gathered some great PaperVision3D example sites: dillerscofidio.com and mcbd.co.uk, as well as a great post on the performance differences between the leading 3D engines for Flash.

Julian Dolce gave what was my favorite presentation of the conference. I am not talking about in terms of content—though quite interesting in its own right—but I thought the structure of his presentation flowed exceptionally well. It was one of those rare presentation’s where code was explained and it didn’t take the whole presentation down a peg or two. Anyway, he covered physical computing, that is, interacting with a Flash SWF via externally connected electronic devices, and vice versa. Julian demonstrated using Phidgets, easy-to-use sensing components that connect via USB, and the Arduino (which he pronounced Ar-drEE-no) board, a circuit board for interfacing with the computer and Flash. As a getting started resource in physical computing he recommended the O’Reilly Media title Making Things Talk. A list of all his presentation links can be found on his blog. The demos he showed would be great and easy to build for kiosks.

Golan Levin (website: flong.com) began his presentation with the caveat: “None of what you will see in this presentation was made in Flash, but it could be.” I had a conversation at the after-party that reinforced this idea in my mind, that many of the graphically-rich experiments of the past 20 years are and can often be implemented in Flash with ever more ease as the power of the Flash player has increased substantially over the years. Flash player 10 and Pixel Bender Toolkit, will no doubt make this even more evident in the coming year.

This was the first year for FlashPitt, and I thought it went well. I didn’t walk away with any prizes, but you can’t win every time. I would probably attend again, but I hope they make it more than 2 tracks. (Shameless plug: The Spring <br /> Conference has 5 tracks and is a quarter of the cost!)

Attending FlashPitt

October 9th, 2008

I will be in Pittsburgh tomorrow attending the FlashPitt conference. It’s certainly nice to have some speakers from FITC without having to make an 8.5 hour drive each way. This conference is cheap too!

Coraldata merged into BirdEye

October 8th, 2008


Thanks to the interest of Jason Bellone at the United Nations, Centre for Advanced Visual Analytics, I am happy to announce that my data structure library, coraldata, has a new home in the BirdEye Information Visualization and Visual Analytics Library. It may take a little time to get all the classes up there, but it resides in the General Utilities package, called GuVis.

Back from Colombia

October 3rd, 2008

Once again the world seems a little smaller. I returned Tuesday night from my first excursion into South America. Just under two weeks in northern Colombia. Months ago, on March 10th, around 4 p.m. while I was at work I received a call from my good friend Liz: “I’m going to Colombia, want to go?” She’d found a ticket for $300 roundtrip to Cartagena, Colombia. That night I was sitting with a group gathered around a table at Casa pouring over dates and departure airports. By 11 p.m. five of us had bought a ticket from Detroit to Cartagena. Amanda, Laura (Red), Zeb, Liz, and myself. The months slipped by, Colombia was out there but so far away we researched barely anything. Then September came. How the time flies in retrospect. I inked out a block of time I’d be away on my course calendar and feverishly put together material for the substitute teacher who would teach the two classes I’d be missing while away. A hour before we were to begin our journey I grabbed a small backpack and stuffed it with clothes, and away I was. I taught my last class and then hit the road to drive through the night to Detroit. By the next morning we walked out of the airport into the tropical air of Cartagena.

I’m grateful to say I have visited many countries in the world, two pages remain in my passport free of any stamps. I did not proactively steer my life toward those experiences, yet the opportunities to fly far away came, and the thought of “why not?” followed momentarily thereafter. Every day I wake up and see a view from my window, and around the world billions of others do the same. Traveling far away I get a glimpse of life through those other windows; At a time and place that will slowly change, yet in my memory those places are timeless. I hold in my memory Vanuatu prior to cell phones, Romania prior to the EU, and however hazy, a glimpse of communist East Germany before the fall of the Berlin wall, a visit I made as a child. Those experiences are precious to me, and some have been life-changing in the most unexpected ways. I sometimes think what I love most fundamentally about working in Internet technology is that it is working with the World Wide Web. A vast library available in theory to all of humanity, that all the cultures of the world can contribute to.

I have digressed however. Colombia. The name evokes cocaine production, political upheaval, kidnappings, and violence. However justified or not, this is a sordid reputation Colombia has suffered and largely retained. If nothing else, this left a visit to the country largely free from expectation. Were we to see this darker side, or was this the Colombia of the past, whose new identity had yet to filter to the surface of the global consciousness? Where we traveled it seemed largely a reality of the past. On a six day trek we took through the jungle to Ciudad Perdida (translation: “Lost City”), an archaeological ruin older than Machu Picchu, we were told the hillsides we hiked on were once large coca growing plantations, that had since been largely eradicated through fumigation (for better or worse, as the environmental impact of the chemicals remained). The ruin itself, where kidnappings had happened in the past, now had a permanent military outpost of armed soldiers who milled about and gawked at the tourists passing through. Indeed, during our visit military and police checkpoints and outposts were a common sight. We were searched more than once, but there never was a feeling of being in danger.

And so we adjusted to the perks of life in Colombia. Shots of coffee from the street vendors in the morning. Smoothies of passionfruit (”maracuya”), mango, and lulo throughout the day. Snorkeling and swimming in warm tropical waters. Nights spent in hammocks. It was a glimpse we all got for the first time of Colombia and it appeared during our brief visit to be positive and optimistic. There was poverty to be easily seen, but not nearly the extent to which I was expecting.

On our final morning during our stay Liz and I sat on some rocks on a beach in Bocagrande, outside of the Cartagena city center, overlooking the Carribbean ocean. At one point a police patrol came by and searched us. Several street hawkers came by with offers of sunglasses, watches, and massages. We were to leave that day, but those lives would continue following whatever path and dreams they will. Maybe one of us will return, but who is to know what opportunities may come down the road for any of us. It may be for another flight to a distant land, for the opportunity to glimpse life through yet another foreign and exotic window, yet one that is entirely the realities of home for the people that live there.

2 Essential FireFox plug-ins for CSS development

September 13th, 2008

FireBug
Firebug allows the live editing of CSS, HTML, and JavaScript of any website. For tweaking the appearance of a webpage, this tool is indispensable for visually seeing the results of your changes to the source code of a webpage. The changes are made locally and are lost when the page is reloaded.

Dust-Me Selectors A thing that bothers me with CSS development is the feeling that there is a precarious ledge over which you are hanging, and as development progresses you are one step away from having a stylesheet that has become unmanageably disorganized and convoluted. This is particularly apparent when multiple people have a hand in editing the appearance of a page, or when you are creating a new stylesheet from an existing one. Dust-Me Selectors is a useful tool for finding CSS selectors that are no longer being used on a page. Additionally, it can spider a whole site to find the CSS selectors that are unused site-wide. The line number and stylesheet name of the unused selectors are provided, so that they can be manually removed. Clean and tidy is a wonderful thing!

The thing I miss about both these tools is the ability to apply the edits directly to the source code of the pages you are working on. A lot of time can be consumed manually applying the changes these tools find, but it is still quicker than making changes without these tools.

What other tools do you use?