Programming Habits: Add increment variation

Especially when building loops, you will need to add an increment to an existing operand or Number variable. There is a logical way to do this and a shorthand alternative using the "++" operator.



is the same as this:


Programming Habits: Using Trace Statements

Trace Statements

Its a great practice to utilize the trace statements if you arent already. A trace statement is used by programmers to test functionality or debug their script. The trace statement IS NOT seen once your swf has been published for the web or viewed outside of flash. Meaning no one will see it when viewing your flash project online. This is the primary reason my flash notes all include a dynamic text box. Normally I would just use a trace statement, but if I did that users would be unable see to the the result of given example. Furthermore, it might better suit you to skip making a dynamic textbox and just use a trace command.


trace("this is a simple trace statement");