Jump to content

Howto setup Phaser in FlashDevelop


benny!
 Share

Recommended Posts

Hey,
 
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...
 
1.) 
 
2.)
Install typescript

 

npm install -g typescript
3.)
Install and launch FlashDevelop
This tutorial uses FlashDevelop Version 4.4.0RTM
 
4.)
Create a new TypeScript Project (Project->New Project->Typescript)
 
5.)
Create a new folder within your project called "lib"
 
6.)
Download Phaser
This tutorial uses Phaser0.9.5
 
7.)
Copy Phaser directory (including the typoscripts) to you lib-folder
 
8.)
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
 
9.)
Press F8 (Build project)
 
10.)
Open the bin/index.html in your browser
Note: if you use assets please use a web server
 
 
Hope this helps a bit.
 
Best,
benny!

PhaserFlashDevelopTemplate.zip

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 ?

 

Best,

benny!

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

post-10-0-32305700-1367953630.jpg

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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