Flash desktop applications using Haxe & SWHX

09.11.2008 18583 10

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

<fdock>
	<config minSize="32" maxSize="128" spread="3" delay="250" spacing="2" fontSize="20" location="top" hidden="true" />
	<shortcuts>
		<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" />
	</shortcuts>
</fdock>

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 ;).

Commentaires

02.08.2008 à 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!!!

30.10.2008 à 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???

30.10.2008 à 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

18.05.2009 à 12:08 daniel

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

24.05.2009 à 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

10.06.2009 à 15:07 Igor Cemim

Nice app!!!
Igor Cemim

06.03.2012 à 15:17 micro

hi,
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

06.03.2012 à 15:44 Michal

Hi,
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

06.03.2012 à 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

13.03.2012 à 15:12 jboadas

This is awesome work thanks for sharing

Laisser un commentaire

http://
×