Saturday, December 04, 2004

ActionScript version, and some other Flash Tidbits

* I was frustrated for about half an hour wonder why Flash MX 2004 complains that the good ActionScript that I wrote has errors. Later I realized that I accidentally exported the movie as Flash 5 format, and suddenly the ActionScript version was dumped down to 1.0. That's why Flash complains that my script is not right. After exporting the movie as Flash 7 and ActionScript 2.0, Flash no longer complains about the syntax.

* When declare a variable in Flash, always specify the variable type (as Flash won't complain and treat the variable as variant). This allows the Flash complier to able to catch syntax error at compile time. It also allows the Flash editor to support Intellisense support.

* I need to write some code in Flash to sense the mouse press and release within a particular movie Clip. OnMouseDown and OnMouseUp do not do the job because the event is captured regardless of where I press and release the button. So I need to use onPress and onRelease.

* Since I need to write a version of the Flash application that runs that works on a Flash 5 player in parallel with a Flash MX 2004 version, I have a chance to see the advance of ActionScript from 1.0 to 2.0, and boy there are a lot. For instance, ActionScript 1.0 does not support strict data typing (var bSomeValue:Boolean). Also the event model of 2.0 is much better than the 1.0.

* I just figured out that the Key press event of Flash 5 is not being supported by the Flash player in NX-70V. Oh well....

0 Comments:

Post a Comment

<< Home