Jump to content

Howto setup Phaser in FlashDevelop


Recommended Posts

as requested in this thread - I made a small tutorial on how to setup phaser using FlashDevelop. This tutorial is based on the fantastic phaser-project-template done by jesse freeman. A flashdevelop project template is attached to this post.
So, here we go...
Install typescript


npm install -g typescript
Install and launch FlashDevelop
This tutorial uses FlashDevelop Version 4.4.0RTM
Create a new TypeScript Project (Project->New Project->Typescript)
Create a new folder within your project called "lib"
Download Phaser
This tutorial uses Phaser0.9.5
Copy Phaser directory (including the typoscripts) to you lib-folder
Adjust project properties to compile to ES5 target
Right Click on Project Name -> Properties -> Build Tab -> add "--target ES5" to the Pre-Build Command Line textfield
Press F8 (Build project)
Open the bin/index.html in your browser
Note: if you use assets please use a web server
Hope this helps a bit.


Link to comment
Share on other sites

I went through this today and it worked great. I don't think I can use FlashDevelop for TypeScript work until they improve it, but it's really great to see it in there! I really need code completion / insight before I could switch to using it.

Link to comment
Share on other sites

No problem, glad it worked for you.


Do you mean by code completion the automatic creation of method stubs, getter/setters etc - or the IntelliSense part? If you mean the latter - did you try to press CTRL + SPACE ?




Link to comment
Share on other sites

yes ctrl + space, and more like how it was with AS3,




..., if they supported code completion and hinting and such for Typescript - I'd be very happy to switch over. ...


All I got when pressing CTRL+SPACE is the following (refer to attached screenshot). Not much - but better than nothing ;-)


Link to comment
Share on other sites

Well, it actually gives you what it says. A typed script language. And therefore, all advantages a (strong) typed language has over weak/loose typed. 


This includes for example:


  • early error catching during compile process
  • preventing of logic errors (e.g. you are always safe which type of var you proccess)
  • better support in IDEs possible, e.g.:
    •  refactoring
    • intellisense
    • ...

  • ...
Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...