2M08 Silverlight

2008-05-23

A hands-on workshop about Silverlight 2.0.

The many MacBooks that are available are probably set up for the Air session this afternoon. Our speaker informs us "We wont be using those", quickly followed by "Silverlight is a cross platform …".

Blend has loads of panels and properties. Nesting controls is possible. You can have a video inside a button.

Changes in Blend are detected in Visual studio. It helps to do a rebuild in Blend to make shure Visual studio isn’t working on an old version. Design view isn’t fully supported there yet. Double clicking on a button doesn’t get you a onClick handler yet.

Silverlight uses layout managers like Flex. Buttons have a content property which enables design and programming to be done separately. You can create some kind of color palette of Brush Resources in Blend which translates to SolidColorBrush elements in XAML. Visual studio has intellisence for XAML which makes it easier to type in there than in Blend. Fullscreen is supported but must be initiated by the user. Controls have a background and a border while other elements have a fill and a stroke. Blend has some glitches when setting properties on multiple controls. Switching to XAML code is the normal reaction to that. Not shure how designers will react to that. Hope these things are fixed when it goes out of beta.

The presentation was quite good, but I’m not sure weather I’m going to dump flash for this.

on Air Brussels

2008-04-23

A long overdue overview of the on Air event in Brussels.

Read the rest of this entry »

Parsing plist files in asp with Microsoft.XMLDOM

2008-04-18

Plist files are more and more ubiquitous. Apple uses them for its configuration files and we use them to describe exercise content. They aren’t very pleasant to read for humans, but that doesn’t mean computers dislike reading them. So I wrote a little javascript to parse a plist file to an object. Hope you like it.

Read the rest of this entry »

Silver Explorer

2008-02-27

As most of my friends know, I’m partially colorblind. Most webdevelopers have no idea what their site looks like for someone like me. Thanks to the power of Adobe Air I’m now capable of letting you experience it firsthand.

Silver Explorer is a browser that lets you surf the net in grayscale.

silverexplorer.air
Flash version 9.0.115 required

full-screen mode in Actionscript 2

2008-02-19

How to use full-screen mode in Actionscript 2:

_root.btn_mc.onRelease = function(){
    if(Stage["displayState"] == "normal"){
        Stage["displayState"] = "fullScreen";
    }else{
        Stage["displayState"] = "normal";
    }
}

var listener:Object = {};
listener.onFullScreen = function(isFullscreen:Boolean){
    if(isFullscreen){
        trace("entered full-screen mode");
    }else{
        trace("exited full-screen mode");
    }
}
Stage.addListener(listener);

Also see Exploring full-screen mode in Flash Player 9.

forceSmoothing

2008-02-15

Rotating and scaling pictures in flash is easy. Just use _rotation, _xscale and _yscale. Except when you publish an swf for Flash Player 8 or newer. Every image you rotate or scale will become jagged. Very anoying. To remedy this you can either publish for Flash 7 or use a complicated loadBitmapSmoothed function that uses BitmapData.

When Flash Player 8.5 came out it introduced the forceSmoothing property. This property is also available in as2. Now all we need to do is set it to true when we load images. Don’t forget that this will have no effect in Flash players older than version 8.5!

It works quite well. In the example below you can clearly see the left picture is more jagged than the right one.

Read the rest of this entry »

pong0.5k, a game in 510bytes

2008-01-30

Mr.doob created a 1k pong game in as3. Which made my fingers itch to do better. So here it is, in as2, less than half the filesize and the same functionality.

Read the rest of this entry »

AIR afterhours

2008-01-18

I’ve been to a great afterhours session about AIR with Peter Elst. He’s writing a book on the subject so obviously there was lots he had to teach. He covered the windowing, file, dragdrop, sqlite and upgrade apis. This was a bring-your-own-laptop session so all the people present were experimenting with the code. We found a few oddities that you usually learn the hard way.

FileFilter behaves differently on mac and windows. On windows the extension parameter must start with an asterisk "*.html", on mac both "*.html" and ".html" seem to work.

Creating and manipulating NativeWindows works great, but adding flex components to the stage of a new NativeWindow doesn’t seem to work. Daniel Dura had a workaround for this, but that doesn’t seem to work anymore.

He gifted a few books at the end. ActionScript 3.0 Design Patterns is now mine. Thanks Peter!

Update: Peter has remembered how to use mx.core.Window as a a native window.

Vista speedup part 2

2007-11-15

My previous post about vista speedup has been quite popular. But it doesn’t mention defragmenting your harddrive. This is such an obvious thing to do I forgot to mention it.

A fragmented drive is a slow drive. As a daily defragmenting tool I use JkDefrag. It is fast, efficient and does the job better than the default tool. Plus it is free and open source.

An even better tool is PerfectDisk 8. It isn’t free, but it can defragments your MFT. That is worth quite a lot.

Flash on the Beach – day 3 – Adobe town hall meeting

2007-11-07
  • New ways of working with video coming soon (before CS4).
  • Cross-domain cache might not come for anything but Adobe stuff for security and privacy.
  • Nothing is said about Flash on the iPhone.
  • Adobe is listening to the community. Just send them lots of mail when you want something done. They really care.
  • They are working on features to make Papervision faster, But they will not replace it by something else.
  • Support for Chinese text will improve.