« January 2006 | Main | January 2006 »

January 25, 2006

Microsoft Expression CTP available.

No, not Crash To desktoP. It's a Community Technology Preview, which means that this is a stable and free demo release for first adopters who want to see what all the fuss is about regarding Expressions.

Expressions is Microsoft's vector based interface system that will appear with the next version of Windows. Expressions is looking pretty cool already...

Microsoft Expression is Microsoft's user interface building system that will be part of Windows Vista - due later this year.

Not only are the graphics in Expression drawn using vectors, the whole Expressions user interface is also built from vectors. You can see this by varying the Workspace Zoom slider in the Expression interface. Wow!

As a Flash designer, you really need to take at least a look at this (especially if all the rumours I am hearing about cross browser, cross platform plugin support are founded). Expressions looks a lot like Flash in many respects - right down to a timeline based animation system... plus the fact that a few notable ex-Flash names have been working on Expressions for the last couple of years (Sam Wan, Manuel Clement). For developers, there are a number of programming languages to choose from via Microsoft Visual Studio. You can get the Express versions of all of the supported languages (Basic, C#, C++, J#) here.

Microsoft Expression Interactive Designer

You can get Microsoft Expression Interactive Designer (and the required WinFX runtime components) here.

Is Expressions really a Flash killer as some sites have been telling us? Well, thats not the issue... and even if it becomes the issue, I don't want to get into that line of discussion. Expression is a very interesting motion graphics system. That in itself should be enough to heighten the curiosity of any Flash designer (especially if you are not put off by the fate of liveMotion, the last 'Flash killer'...).

Microsoft Expression user interface

Oh, and you might also want to have a look at KineticFusion. This will allow you to convert a Flash swf into XAML (Expression's native format), something that will be very useful if Expressions does turn out to be an integral part of Microsoft's successful world domination plan.

Posted by motiongraphics at 11:28 PM | Comments (3)

January 14, 2006

Dynamic frame rates for Flash animators.

Unlike a number of other applications, you cannot change the frame rate of a Flash swf at runtime. You can only set the frame rate of the whole swf at author time.

Well, that is except if you read this entry, because I'll show you an easy way (which I call framerate pumping) to change the frame rate of any movie clip in your swf so that each of them can run at a different framerate if you want!

Flash has a useful timed event handler for ActionScripters, setInterval(). This allows you to run a script periodically at a defined time period. That’s not the same as having a timeline that runs at a user defined frame rate, but you can create a setInterval() event handler that forces a timeline to run at a user defined speed. This means that you can vary the frame rate of each movie clip at runtime. You can even do it to the root timeline.

This is way cool for animators because it allows them to create more expressive animations. You can even add that ‘go fast for a split second and then slow down’ effect they use a lot in the Matrix (and any number of other films since) to create tension and/or make key moments in the action stand out.

A speeded up timeline is easy to create. Try this:

In a new fla using the default frame rate (12fps), create a tween animation inside a movie clip (such as a motion tween moving a simple circle symbol left ro right). Test your movie. Nothing unusual so far.

On the first frame of the movie clip, add the following code:

function timelineFaster() {
  nextFrame();
  updateAfterEvent();
}
var tweenFaster:Number = setInterval(timelineFaster, 1);

When you test this movie, the code will force the timeline to run as fast as it can. The script is actually telling Flash to move to the next frame every 1ms, or 1000fps. Flash can’t get that fast, so the timeline goes as fast as it can (typically 40-70fps).

To run at a movie clip at a more sensible speed such as twice the frame rate, substitute the 1 in the last line to 1/24s, (which equals 42ms).

var tweenFaster:Number = setInterval(timelineFaster, 42);

This makes the timeline go twice as fast as the normal frame rate (24fps as opposed to 12fps).

To undo the frame rate change, add the following line on the keyframe you want normal framerates:

clearInterval(tweenFaster);

If you want the timeline to continue playing from this keyframe, also add a play().

The 'scripters out there will of course see that its pretty easy to create a new movie clip class that has a frame rate property (or you can use prototypes to change the MovieClip class directly) but I don’t really think that’s necessary - most of your movie clips will run at the standard frame rate, and you will only want one or two to run faster/slower.


Posted by motiongraphics at 11:14 PM | Comments (27)