Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Extending Flash MX 2004, Part 3: Using History and Flash Panels for Faster Development

The History Panel is one of the best learning tools for Flash—if you know how to take advantage of the information it stores. Learn the History panel as well as how to make your own Flash panels.


advertisement
eet the History Panel and read how it can help you learn the basics of JSFL. I will also show you how to make your own Panels based around Flash Movies that can be opened in the IDE. The Flash MX 2004 IDE contains a History panel at Window —> Other Panel —> History.

The History panel tracks every interaction you make with the Flash MX 2004 IDE. Each interaction is listed as a separate action and stored in reverse chronological order. At any time you can select one or more actions you previously performed and replay them. So for example, if I were to draw a rectangle, and then later delete that rectangle, I can draw it again in exactly the same place and at the same size by simply selecting the Rectangle action from the History panel and then clicking the Replay button. Or, alternately, you can replay it by right-clicking the action and selecting the Replay Steps option from the dropdown list that appears (see Figure 1).

When you Undo a change you have made in Flash MX 2004, using File —> Undo (CTRL + Z), that particular action is then removed from the History panel. The opposite is true, when you then choose to Redo that action, because you didn't mean to Undo it in the first place, File > Redo (CTRL + Y). The action is then added to the bottom of the actions list in the History panel. The History panel makes it really easy for anybody just starting out with the JSAPI to build commands that automate particularly tedious or common tasks. The process of creating a Command file within the History panel is fairly straightforward. To start, clear the History panel (use the 'Clear History' item from the History menu).



Figure 1. Instant Replay: Right-click an item in the History Panel and select Replay Steps to repeat (redo) a change previously made.
Now perform a sequence of actions in the Flash MX 2004 IDE that you want to use regularly. Select the group of actions you performed in the History panel and then click the disk icon in the bottom right hand corner. Enter a name for your Command and then click the OK button. You now have yourself a new Command in your Command menu, which, when selected, will execute and perform that particular sequence of actions. The .jsfl file has been created for you, and saved into the correct directory for the Command menu.

There are technical limitations with the History panel—some of the interactions you make with the Flash MX 2004 IDE cannot be replayed. You will recognize these as they have a red X in the corner next to the icon for that action. The History panel can also display the JSFL actions required to perform a particular interaction within the Flash MX 2004 IDE. This comes in handy when trying to learn how to make Flash do something with the JSAPI. So, for example, if you wanted to know which function to use to add a new layer to the current timeline using JSFL, you can tell the History panel to expose the function calls, by changing the view settings (see Figure 3).


Figure 2. Customize Your History: Select a series of items in the History Panel, click the Disk icon and enter a name for your new Command.
 
Figure 3. Changing History: Change the view settings in your History panel to get more details on JSFL actions.

Then you can add a new layer to the timeline manually, which will add a new action to the list in the History panel. You can then copy that function call by right-clicking it in the History list and selecting Copy Steps.

You now have the JSFL code in your clipboard, which you can then paste directly into any text editor (see Figure 4).

Figure 4. Copy Steps: Copy function calls by right-clicking it in the History list and selecting Copy Steps.


Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date