18Nov/101
(basic) as3 stuff
some things I learned in my last action script project:
- be sure to make a loader class with a dictionary that holds references to files you already loaded
- make a basebutton class to handle your different button states
- extend that class when you need to
- implement a reset function in your swf files so you reset an already loaded file
- program event driven, the more events you dispatch the more power you have to interact
- leave designing to the designers and motion to the motion developers and force them to use flash as it is intended; as scripter you need to demand fla files with embedded animations instead of making them yourself
- Event.ADDED_TO_STAGE is very powerfull if you use a MVC program model sinc you can access your Controller when the model is added to the stage.
- trace debug stuff with the timestamp and fully qualified class name so you know which class spawned the trace event
- Declare baseclasses of .fla files as a dynamic class so you can add new properties on the fly (you know you want to!); you can always implement or extend the property in the class itself
- buy a crap cheapy netbook to test performance on a low level machine
- never think a preloader isn't needed; implement it but hide it if the file is loaded < 500ms or so (a flickering preloader is just as bad so don't always show it)
- the predefined flash components are just as strong as the predefined html form elements, they do a lot but never everything your crazy designer thinks off
- let buissines logic be handled by the backend if available (e.g. let the backend decide what you need to show make sure you can make it show)
- Use a generic XML parser (if used) or use json if you can handle it ;)
- if you are using XML parse the nodes into AS values so you can handle them directly


November 18th, 2010 - 10:23
Handig! en herkenbaar.