Streamline Code Using The Conditional OperatorInstead of writing 5 lines of ActionScript code for a simple if..else block, you can achieve the same logic in 1 line of code using the "?:" conditional operator. For example, the following piece of code... if (x < 5) { ... can be written in one line as follows... y = (x < 5) ? 1 : 2; More information about the conditionanl operator can be found in the official Adobe documentation. |
about
contact
rg -at- ryangorer.com
tags
syndication
creations
|