benny! Posted May 6, 2013 Share Posted May 6, 2013 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.) Install NPM 2.)Install typescript npm install -g typescript3.)Install and launch FlashDevelopThis 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 PhaserThis tutorial uses Phaser0.9.5 7.)Copy Phaser directory (including the typoscripts) to you lib-folder 8.)Adjust project properties to compile to ES5 targetRight 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 browserNote: 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 More sharing options...
rich Posted May 6, 2013 Share Posted May 6, 2013 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 More sharing options...
digidanger Posted May 7, 2013 Share Posted May 7, 2013 Thank you very much benny.! i tried this following Jesse Freeman phaser tutorial, and it worked..!and yes as rich said, hope the FlashDevelop guys improve typescript with code completion and stuff. Link to comment Share on other sites More sharing options...
benny! Posted May 7, 2013 Author Share Posted May 7, 2013 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 More sharing options...
digidanger Posted May 7, 2013 Share Posted May 7, 2013 yes ctrl + space, and more like how it was with AS3, Link to comment Share on other sites More sharing options...
Andrew Fleming Posted May 7, 2013 Share Posted May 7, 2013 Oh yes, if they supported code completion and hinting and such for Typescript - I'd be very happy to switch over. I love using FD for developing Flash apps, I'd love to use it for Phaser/TS development. Here's to hoping! Link to comment Share on other sites More sharing options...
benny! Posted May 7, 2013 Author Share Posted May 7, 2013 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 More sharing options...
Gotama Posted May 14, 2013 Share Posted May 14, 2013 ive been looking around on here http://www.typescriptlang.org/Tutorial/ to try see what the advantages are for using ts but cant really figure it out... Please excuse my ignorance by explaining to me what ill get out of typescript? maybe it supports HTML5 and js really nice? but is it just an unnecessary gadget? Link to comment Share on other sites More sharing options...
rich Posted May 14, 2013 Share Posted May 14, 2013 Without wanting to sound flippant I'd say that if it's not obvious from the main TypeScript site, then it's probably not for you. Link to comment Share on other sites More sharing options...
benny! Posted May 14, 2013 Author Share Posted May 14, 2013 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 processpreventing of logic errors (e.g. you are always safe which type of var you proccess)better support in IDEs possible, e.g.: refactoringintellisense...... plicatibu and Gotama 2 Link to comment Share on other sites More sharing options...
Recommended Posts