Flash desktop applications using Haxe & SWHX

11.09.2008 19265 10

The dock is configurable with a XML file (in data folder):

	<config minSize="32" maxSize="128" spread="3" delay="250" spacing="2" fontSize="20" location="top" hidden="true" />
		<shortcut name="My Application 1" path="C:\path_to_my_app1\myApp1.exe" icon="data\icons\myApp1Icon.png" />
		<shortcut name="My Application 2" path="C:\path_to_my_app2\myApp2.exe" icon="data\icons\myApp2Icon.png" />

Sample of fdock.xml file
First comes a « config » node with the following attributes:

  • minSize: Size in pixels of the icon when not magnified
  • maxSize: Maximum size in pixels of the icon while magnified
  • spread: Number of icons that will be magnified while rolling over the dock
  • delay: Delay, in ms, for the tweening to display the dock
  • spacing: Space in pixels between icons
  • fontSize: The font size of the text displaying the icon's name
  • loaction: top, left, bottom, right, are the dock's screen positions available
  • hidden: Boolean telling if the dock has to disappear from the screen when rolling out (motion tween)

Then one « shortcuts » node that contains one or several « shortcut » nodes with the following attributes:

  • name: The string that will be displayed under the icon
  • path: A string that specifies the shortcut's application path
  • icon: The path to the picture to display for the shortcut

You can download the sources here:

Here's a preview of the article :

Thanks fly to Béatrice, Céline, Séverine, Sylwia, Franco, Matthew, Nicolas and those I've forgotten for their precious help ;).


08.02.2008 at 08:21 Lukar

I think this is the best haxe + swhx example i've found ever since i committed myself to create an application with haxe for work... Thank you for providing the source code online!!!

10.30.2008 at 04:38 Jean

This is awesome! by far the best! do you know why it won't work on Vista? is there any fix for this???

10.30.2008 at 09:04 Michal

Hi !
Thanks for your messages !
I'll take a look at that and upgrade for working with Haxe 2.0 and run it also on Vista

05.18.2009 at 12:08 daniel

hi, is it possible to open a directory from swhx and show it's content?
thx, regards

05.24.2009 at 12:34 Michal

Hi Daniel,
When writing a SWHX application, you need Neko's API in order to operate with the file system.
So take a look at : haxe.org/api/neko

06.10.2009 at 15:07 Igor Cemim

Nice app!!!
Igor Cemim

03.06.2012 at 15:17 micro

thx for share
i through your article and i have a problem!
when i downloaded swhx lib , want to run example or your program (.exe) and i encounter this error:

load.c(176): Module not found: app.n

03.06.2012 at 15:44 Michal

It's an old example, I think there are few changes since it was released.
Let me take a look at this app, I'll try to update the post ASAP

03.06.2012 at 16:59 Michal

I've updated the DLLs in the archive.
It works fine today.
See Changes.txt for more informations.
Feel free to download and test it here

03.13.2012 at 15:12 jboadas

This is awesome work thanks for sharing

Write a comment