Categories
Flash Misc

Notepad++ opens ActionScript file with Haskell syntax highlighting

Sometimes I open ActionScript files in another editor then FlashDevelop. And in my case this is Notepad++.
Notepad++ has ActionScript syntax highlighting but it seems that it doesn’t detect it.
When I open an AS file it uses the Haskell syntax highlighting, and that is very annoying especially when you open a couple of files and you need to set them one by one to ActionScript.

Google (who else) provided the answer: here.

This is what you do:
find and open the langs.xml file
you can find it in the install folder of Notepad++, in my case
C:\Program Files\Notepad++

find the haskell language
< Language name="haskell" ext="hs lhs as las" commentLine="--" >

and remove “as” from the ext and save the file.

Next time you open an AS file with notepad++ it will be highlighted in the correct syntax

🙂

Categories
AS3 Flash

Box2DFlashAS3 Refactored

If you are a Flex/Flash developer (and not familiar with another programming language), you will agree that the syntax for Box2DFlash is not following the AS3 coding conventions and seems funny.

Not that I’m so good at it (seem to have a lot of problem shaking the suffix “_mc”) but other people have the same problem: read this, this and this.

And one of them refactored the code, and not just someone: it done by John Lindquist (box2D user-name is pv3d).
John is one of the “Committer team” (?) of papervision3D and writes tutorials for papervision3D on pv3d.org.

You can find the code at http://code.google.com/p/box2dflash/ and John started working on tutorials (http://box2dflash.org/) but stopped after completing one… 🙁

[swf]http://box2dflash.org/sites/default/files/flash/RefactoredBox2dSpeedTest.swf, 520, 390[/swf]

I’ve took a quick look in the examples made by John, and I must confess that it seems more familiar/easier.
Conventions are you friend…

But what to do? Use the box2D port to AS3 from C++ or use the refactored one.
I’m using the original Box2DFlash AS3 2.0.1, not only for this reason (shaktool is one of two programmers responsible for the C++ to AS3 conversion and maintenance) but a lot of tutorials are based upon the original.

But I can’t wait for Box2DFlash AS3 2.0.2 and see what skatehead, shaktool and borisTheBrave have decided (I’m secretly cheering for John’s version!)