views:

82

answers:

2

I have been moving over to JavaScript (esp. canvas) from Flash / Flex / ActionScript 3 (JavaScript is a more open platform), and I was wondering if anyone has any advice on differences between the two platforms, important things to note, pitfalls, optimizations, etc.

+1  A: 

Canvas in particular does not work as consistently between browsers as Flash, which is almost completely consistent when its available. If you don't already, you will want to get used to testing things in multiple browsers.

jarrett
I understand this, but I am more of a hobbyist, so I don't care about IE. (also, I could always use IECanvas)
PiPeep
+2  A: 

First advice: Turn arround! ;-)
If you can't then I would tell you the following:

  • On the AVM2 everything is consistent in behaviour and how things were displayed. JavaScript is exactly the different. You can find parts of you code that work different in every browser. So you really need to test on different browsers.
  • Start learning JavaScript, NOT any framework (most people on Stackoverflow would suggest jQuery). Later if you are familiar with most of the pure JavaScript stuff you could chose a framework of you choice.
Hippo
As crazy as it sounds, I don't wish to turn around because of the closed nature of Flash. I would rather have a semi-decent language that is free, than an excellent language that is closed.
PiPeep
then you maybe should have a look at: haXe (http://www.haxe.org) it is open source language and it compiles to flash movies (and JavaScript, PHP and other platforms too)
Hippo
I have seen HaXe before, and it is very nice. I may consider teaching myself HaXe one of these days.
PiPeep