Introduction to JSFL Contributed by Dave Logan www.dave-logan.com

images

AN EXTENSION is basically a plug-in, something that is added to Flash and extends its functionality. JSFL only affects the Flash authoring environment (i.e. Flash CS3) and has no effect on published Flash Player files (i.e. .swf files).

The best part about JSFL is that anyone can use it to speed up and improve their workflow. JSFL is based on the ECMAScript standard, which means it’s very similar to other languages based off the standard, such as JavaScript and ActionScript. If you don’t know anything about programming, you’re still in luck. You can create custom commands without touching a line of code. The best way to dive into JSFL is to play around with the History panel. To open the History panel, go to Window > Other Panels > History.

 

images

1 Select the Rectangle tool image and draw a rectangle. As you can see, the History panel behaves like it does in most Adobe programs, compiling a list of your actions.

images

2 Select the Rectangle and delete it. You’ll see each action added to the History panel.

images

3 Select the first event, Rectangle, which popped up when you drew the rectangle. Press the “Replay” button. Voila! The original rectangle reappears.

images

4 Now let’s make it into a command. Click the floppy disk icon in the lower right-hand side of the History panel to save this command. Name it something like “Create Rectangle”.

images

5 Now go to the Commands menu, and lo and behold, there it is! Your very first Flash command. You can make all kinds of simple commands like this. If you find yourself doing some simple action over and over, create a command for it!

images

6 Afterwards, you can access the command even more easily by assigning it a shortcut by going to Edit > Keyboard Shortcuts.

images

7 There is a catch, however. Use the Brush tool to draw something on the stage. Look in the History panel. Notice the little red X next to the Brush event? That means that you can’t use it in a command. To put it simply, Flash treats some tools a little bit differently than others, and because of that you can’t use them in your commands. The important thing to know is that the History panel can be used as the foundation of custom commands. This goes far beyond replicating rectangles.

 

image

Hot Tip

To add your own shortcuts, you have to create your own shortcut set. It’s easy. In the Keyboard Shortcuts window, click the little Duplicate Set button with two pieces of paper and an arrow at the top right. Name your set (it doesn’t matter what) and press OK. Now you can modify and add your own shortcuts.

images

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.202.187