FlashDevelop Start Page plugin

16.06.2013 2911 0

I have many projects nested in folders that are nested in another folders and I pass time to explore my HD to get the right FlashDevelop project.
Now I have the possiblity to open a FlashDevelop project from the StartPage. It's actually done like that for the Recent Projects panel.

How is it done ?

I took a look (waw! that sounds crazy !!! "tookoolook" ...) at this part of FlashDevelop source that you can find here

private StartPageActions startPageActions;
this.webBrowser.ObjectForScripting = this.startPageActions;
public class StartPageActions

As you can see, the "external" part "available" for the browser engine is here and there are only some methods available as said upper but nothing about interracting with the File System (...or maybe my knowledge of C# is too limited too...)
Anyway, at this step, the time was to experiment some things to achieve my goal and, using of course, only Haxe !


The Start Page is a simple HTML with an external object as seen before and there is no way to do some server-side stuff. So maybe with a remote connection ?
A simple Socket connection should do the job but there is no socket connections using JavaScript.
I could use the SocketWrapper from the Haxe Remoting but, it's a kind of bridge between JavaScript and Flash that enables JS using Flash's socket...It's a bit heavy for my need here.
The next solution is a simple AJAX request using directly XmlHttpRequest or still with the haxe remoting.
But in this case, we have to connect to a HTTP Server ...something like Apache is ok but it's still to big for my experiment.

A solution

The solution I choosed is somehow at the middle : Since a HTTP request, as any connection, is a socket at the lower level, I decided to quickly write a tiny Neko server that handles basically the Haxe remoting HttpAsyncConnection requests
So at the end, I have a little Neko app launched that listen at : 2010 and contains the server-side methods available from the Start Page, a kind of "external context" for the borwser
Here you can see my FlashDevelop plugin entirely written using Haxe and which displays all the FlashDevelop projects contained in a specified location and its sub-folders.
The panels are movables and resizables and their properties are stored in a config file so you can define a kind of layout as below :


A tooltip displays the source code (AS3/Haxe), the target, the version and the full path to the project. You can open find and open a project by a click.



You can download the working stuff here.
A README.txt is included and explains the installation:

  • Extract files form archive
  • Define the root path in the index.html file. It's the path containing your FlashDevelop projects and it will be parsed recursively :
    FDAllProj.showFDProjects( "c:/workspace/projects" );
  • Open FlashDevelop and go to the Program Settings ( Tools > Program Settings...).
    Check for the Start Page plugin.
    Set Custom Start Page pointing to the absolute path to the file index.html and Use Custom Start Page to true.
  • Launch the batch run.bat (neko fdsp.n)
  • Open the Start Page in FlashDevelop

Let me know if it works well for you


This stuff was done for "the sport" and the fun, but you can download the sources here
Both the server (Neko) and the client (Javascript) parts are splitted into parts so it makes easier the developement of eventual future plugins ().
By the way, I know that this kind of javascript apps are quite heavy and slow for a development but, it could be interesting to give FlashDevelop users a wider browser's external object in order to get a better interraction with their lovely IDE !
Long life to FlashDevelop !


Laisser un commentaire