insight

Taking Away3D for a Spin

by Matt Skoog February 2, 2010

Toward the end of last year, the Springbox Rich Media team was tasked with building an interactive 3D view of the interior of Honda’s CrossTour model. The client wanted a Flash application that was flexible enough to handle additional vehicle models moving forward. This presented an interesting challenge because the 3D had to be interchangeable as well.

After reviewing all of their requirements, I decided to build an XML-driven Flash application that utilized the Away3D open source Flash library. The creation of the application went a lot smoother than I had expected. I had used Papervision (an alternative 3D Flash library) in the past, but I wanted to explore something different. I have to say that, after building this application, I’m a huge fan of Away3D.

The 3D engine performance is great, the documentation is very clear and the implementation of the code is very logical. The toughest part of the entire project was finding a way to plot points inside of the 3D view of the interior. After that was sorted out, it was smooth sailing. Check out the live app for yourself.

For those looking to explore other options in the 3D world of Flash, I highly recommend Away3D. 

 

Responsible Flash Development: File Size

by Matt Skoog June 12, 2009

In this installment of Responsible Flash Development I will give you some tips to keep your overall file size down in your Flash projects. File size is an important part of Flash development and, if left unaddressed, can quickly get out of hand. But, before we get into file size optimization in Flash, we’ll begin a step before: prepping assets outside of Flash.

Asset preparation
Asset preparation is a major step towards minimizing your Flash file size. First, take a look at the composition that you need to build in Flash. See what items can be a vector graphic versus what has to be imported into Flash as a bitmap graphic. When it comes to bitmap graphics, I could write an entire article over compression techniques. Take a look at these articles for a little more insight on graphic file types and compression.

Nine times out of ten you will save file size by using a vector asset over a bitmap. This depends on the complexity of the vector. If you’re not sure about what type of graphic to use for a particular shape/asset, import both of them into a new Flash file and place them on the stage. Select the option to “Generate a Size Report” in the publish settings and publish the movie. The asset with the smallest file size is your winner!

Once you have imported and/or created all of your assets in Flash, you can do additional optimization using tools inside the Flash IDE. Each bitmap in the Library can have its own additional compression settings. When doing this, you need to think about the importance of your bitmap. For example, if you have a bitmap that’s not going to have much face time in your project, you may get away with a little more compression on it. Vector assets can be optimized as well, by adjusting their curves and points. A word of caution, this optimization can severely alter the shape of your vector, so use these options sparingly.

Coding techniques
Get creative with your code. Let’s say that there are 5 balloons in the composition and all 5 are different colors. Instead of importing 5 different assets, just import one. Then build a class that allows you to change the base color of the balloon asset. You’ve now accounted for 5 balloons at 1/5 of the file size!

Fonts
Fonts can make or break your file size and are often overlooked. Take note of the fonts used in the composition. If you are using multiple fonts that will be dynamically updated, you may want to consider using fewer fonts. If a font is dynamic, you will have to embed the fonts. Basic font embedding can range anywhere from 5-30k in size. Lets say that you have 3 dynamic fonts that are around 20k, if you choose to use all 3, you’re already at 60k in file size just for fonts! Sometimes, this can’t be avoided so you’ll have to make up for that size in different parts of your project.

Tween types
Now that you have all of your assets completely optimized and your fonts squared away, it’s time to animate! If you prefer to use third-party tween libraries to animate in Flash, choose your library wisely. Some libraries have more capabilities, but are a bit heavier (Tweener). Others are lighter, but have a less capabilities (TweenLite). If I’m building a site, mini-site, or feature, I may use a library like Tweener. If I’m building banner I’ll use a library like TweenLite.

Use of these tips can greatly affect the size and performance of your project. Try to keep them in mind the next time you’re working on a Flash project and you’ll see that your end result will be a faster, slimmed-down Flash application.

Responsible Flash Development

by Matt Skoog March 20, 2009

Flash is a powerful tool that, if used correctly, gives you highly interactive and immersive experiences. There are a lot of sites out there that implement Flash poorly, which, in turn, can give Flash (and those who develop with it) a bad rep. Don’t get me wrong; I’m not saying that Flash has no faults/shortcomings, because it does. What I’m saying is that in order to provide the best experience for your audience, you’ve got to keep some things in mind before and during your Flash development.

Before you consider Flash as an option for your project, understand your specific wants and needs. Once you have those established, weigh them against the common issues/drawbacks of Flash. Some of these issues can include:

•    File Size
•    CPU Usage
•    System Memory
•    Bandwidth Allocation
•    Usability
•    Accessibility
•    Search Engine Optimization (SEO)

All of these issues can be addressed in Flash. As a Flash developer, you have to address these issues in a responsible way. For instance, file size can be addressed through proper image optimization, knowing when to use vector graphics vs. bitmap graphics (and vice-versa), and limiting the usage of multiple embedded font styles. CPU usage and system memory can be improved by clean coding practices and limiting gratuitous amounts of effects/animations. Usability, accessibility and SEO issues can be addressed with third-party code libraries such as Cannonball and SWFAddress.

In the end, a Flash application can be built in thousands of different ways, resulting in thousands of different outcomes. Most of the Flash projects that are successful have found elegant solutions to these common issues.

We’ll delve deeper into the issues affecting responsible Flash development in future Insight articles. Stay tuned.

In the meantime, what are you doing to ensure the success of your Flash applications?

The opinions contained in these pages do not necessarily reflect those of Springbox or its parent company, DG.
| PRESS | COMPANY | CAREERS | INSIGHT | CONTACT |