// you’re reading...


30 Days of CS5: Code Snippets

Flash Professional’s new Code Snippets is one of those features that makes me both love and hate Adobe. The love comes from a deep gratitude for taking a difficult task and making it much faster and easier. The hate comes from the fact that I’m not programattically inclined and I’ve spent a good chunk of the last year struggling to learn ActionScript. Much of that learning has now been made redundant by the new Code Snippets panel. So, if you’ve procrastinated learning ActionScript, rejoice! With Code Snippets, your learning curve is now much shorter than it was just a few short months ago.

What are Code Snippets?
Code Snippets are a library of easy to use commands written in ActionScript, Flash’s robust programming language. Code Snippets won’t replace the need for advanced designers to master ActionScript, but they will reduce the need for those of us who dabble in Flash to really dive deeply into the ActionScript programming language. For an analogy, Code Snippets are to ActionScript what a Content Management system is to HTML. With a content management system, a user can easily bold the text on their Web site by clicking on the Bold icon rather than entering tags around their content.

Using Code Snippets, I can create a button in InDesign or Flash then drag the “Click and Go To Web Page” snippet onto the button and type the correct URL into the designated line in the Actions panel to create an interactive button. This replaces the need to create a dedicated Actions layer, assign an instance name for the button and remember the correct set of commands in ActionScript to get the button to work.

To use Code Snippets effectively it still helps to have a rudimentary understanding of the ActionScript language, particularly the core portions of the syntax. You should, for example, know what an Instance is and how it is used by ActionScript. These concepts are relatively simple to learn and implement, particularly when you compare it to the difficulty in learning how to hand code, even elementary ActionScript.


No comments for “30 Days of CS5: Code Snippets”

Post a comment