Optimizing Flash Ads and some XFL Gourmet [ by Thibault Imbert ]

I recently blogged about the Ads optimization topic. I finished writing a little whitepaper on this, covering mainly graphical optimizations with topics like shapes optimizations, framerate, the usage of video, filters and other graphical effects. The paper is mainly targeting designers and interactive designers rather than developers, which was more the audience of the previous […]

Multi-Touch Water Simulation Example

Microsoft Surface has a cool simulation that allows you to drag your fingers across the table to create a water simulation. That got me to thinking about doing it in Flash. Thanks to David Lenaerts’ excellent Ripple class, it took me about 10 minutes to create the example below.

As you can see the performance is very nice. The code that I used to create this is below. Again, all of the cool stuff comes from David’s code.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import be.nascom.flash.graphics.Rippler;
import flash.events.TouchEvent;
import flash.ui.Multitouch;
import flash.ui.MultitouchInputMode;

Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;

stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;

var t:Bitmap;
var r:Rippler;

t = new Bitmap(new bmap());
addChild(t);

r = new Rippler(t, 60, 6);

stage.addEventListener(TouchEvent.TOUCH_MOVE, handleMouseMove);

function handleMouseMove(e:TouchEvent):void
{
    r.drawRipple(e.stageX, e.stageY, 20, 1);
}

Lee

Profiling Flash Player Rendering [ by Thibault Imbert ]

When developing Flash content, profiling the VM or custom code called can be done through the profiler bundled in Flash Builder or through the Flash Player configuration file (mm.cfg). Those give you low level details about the VM but does not give you an overview of what is happening behind the scenes concerning the rendering […]

ByteArray Access to NetStream in Flash Player 10.1 [ by Thibault Imbert ]

There are moments like this, when you read the documentation of the Flash Player and you discover and nice new API that you have been waiting for such a long time. Do you see what I mean ? Yes, you read it right, ByteArray access to NetStream class is coming and it works beautifully in […]

Watch My Sessions From Flash Camp SF

Advanced Text Layout With Flash CS5
Flash Player 10.1 introduces a full, native multi-touch API that allows you to create some amazing applications. In this session I demonstrate how to build applications using native multi-touch feedback as well as how to use the built-in gesture support for things like scaling and rotating.

Introduction to Multi-Touch in Flash Player 10.1
I give an introduction to some of the new Text Layout features and functionality in Flash CS5.

Lee

Increasing The Code Hint Cache Size In Flash CS5

You may have read my earlier post about needing to not have two many files in your ActionScript source path in Flash CS5. After a certain number of files is reached, Flash will basically abort. This is to prevent Flash from indexing your entire hard drive if you happen to save your file in the top level of your disk (i.e c:\). Now the limit is actually 1000 files by default, but as hardcore Flashers know, sometimes your global AS directory can be much larger. Well luckily there is a way to change this limit. WARNING: do not change this if you are uncomfortable with editing your registry. Also do not change this and then complain that Flash is running slow when you save your FLA into your root directory of your hard drive.

Windows:

  1. Open Regedit and navigate to: HKEY_CURRENT_USER > Software > Adobe > Flash 11 > Settings
  2. Right+click and choose: ‘New… > DWORD Value’
  3. Rename the key: Project File Cap
  4. Select the key and choose: ‘Modify’
  5. Edit the value as either hex or decimal: 1000
  6. Click OK and restart Flash

Mac:

  1. Open ‘/Users//Library/Preferences/Flash CS5 Preferences’ in Text Edit
  2. Under the section add the following:
    1000
  3. Save the file and restart Flash

What should you set it at? Well if you are good about saving your FLA files into their own folders, then it doesn’t really matter. I would try 5000 and see if that works. You can always change it back. Adobe is working on an official TechNote about this too.

Lee

Fixing Code Hinting in Flash CS5

I’m sure that most people who frequent this blog have already downloaded the Flash CS5 trial and started playing with it. If not, go over to the Adobe site to get it. One of the coolest new features is custom class introspection in the Actions editor. There is one important thing to be aware of though in order to get things running smoothly. In the screenshot below you will notice that a yellow warning sign appeared in the bottom-right of the panel when I tried to use code hinting. This means that Flash found too many files on the classpath and basically it stopped looking for custom ActionScript files.

Ok so what does all this mean? If you set a source folder in your ActionScript settings, you need to be sure that it is not a top-level folder on your system or any other folder that has a large amount of sub-directories in it. When Flash starts traversing that folder it will only go so far before bailing out. The fix? Just make sure that you point Flash to a dedicated directory of source files and also save your FLA file into its own folder rather than just plopping it onto the desktop. If you do get the little yellow warning, you will have to relaunch Flash in order to fix the issue once you move your files to a more appropriate location.

Lee

Optimizing Flash Ads [ by Thibault Imbert ]

I am working on a new document on Flash Ads performance, the idea of this document is to focus on graphical optimizations, cause ActionScript is rarely (sometimes it is) in fault in ads, and mainly created by designers. Flash ads talks to anyone, we all see them when browsing different websites, some of them […]

What can you do with bytes ? – The first bits [ by Thibault Imbert ]

A year ago, I announced I would be working on a new open-source book called “What can you do with bytes?” distributed as a PDF (Note that the O’Reilly style cover on the left is just pure imagination and created to illustrate the PDF, no printed version planned).
With some delay, due to many projects lately, […]