Creating code snippets


show more Creating code snippets provides you with in-depth training on Web. Taught by Todd Perkins as part of the Flash Professional CS5 New Features show less
please wait ...

Creating code snippets

With the Code Snippets panel, you can also create custom code snippets. We'll take a look at an example in this movie. One of the snippets, in the Code Snippets panel, is for keyboard control of an object. So you can use that in something like a game, to move an object around. However, the functionality is a little bit limited. I added some functionality to the keyboard control. In this movie, we'll look at making that into a custom code snippet. Let's take a look at the code I have in the Actions panel. Here, I have all the code for keyboard control.

At the very bottom, I'm adjusting the x and y position of an object, and the object is instance_name_here. Note that it is red, and that's significant. We'll take a look at that in just a minute. Wherever you want to have the instance name of an object that's going to be manipulated, you need to put instance_ name_here inside of the Actions panel and make sure that it's red. That means you typed it correctly. So on...

Creating code snippets
Video duration: 3m 23s 1h 19m Intermediate

Viewers:

Creating code snippets provides you with in-depth training on Web. Taught by Todd Perkins as part of the Flash Professional CS5 New Features

Subject:
Web
Software:
Flash Professional
Author:
please wait ...