Wednesday, November 08, 2006

Optimising for Beginners - Part 2

In the last article I explained how to and why optimise. In this part I'll show you how to compress the entire process of optimising graphics into one single action. This helps you save huge amounts of time, especially if you're facing the daunting task of optimising an entire movie after it's done.

History and Commands

First things first: if you haven't got the History Panel open, you'll find it under Window > Other Panels > History. Open it now and dock it into the right-hand column of panels.

The history is a list of actions you have performed in Flash. For example, the following screenshot shows a list of things that I've just done on the stage:



Now first thing you may notice are the red Xs on some of the steps. We'll cover them in a bit, but for now, you can see how each item in this list represents some action that was done in Flash.

These steps can be saved, either as single steps or multiple steps. Once saved, you can run these steps at any time. So let's give it a try now:
  1. With the Brush tool or the Pencil, write your name, or create some artwork on the stage (just a squiggle will do.. no need to draw anything in particular - even a single brush stroke will suffice for this exercise).
  2. Now select this artwork and go to Modify > Shape > Optimize
  3. Bring the slider down to about 1/8th
  4. Uncheck 'Use multiple passes'
  5. Click OK
After performing these 5 steps, you'll notice that in the History panel, your optimise step is listed. As I mentioned before, you can save this step and 'replay' it to optimise any artwork you have selected.

Before we save it though, you can view the code behind this step by selecting the Context menu of the History panel and choosing View > Javascript in panel:



Now I mentioned in Part 1 of this article that there's a reason I brought the slider values (1 - 64) to your attention. Take a close look at the javascript that performs the optimise step:


- - you may need to expand the docking column to see the entire line (see red circle)--

  1. This number 8 was the position of the slider in the optimise window.
  2. The word 'false' means that 'Use multiple passes' was unchecked (our earlier step 4).
The reason I've shown you this javascript stuff is so that you can have various levels of optimising saved as one step.

-------

Saving steps as a Command

In the lowest part of the History panel are a few icons, one of which is a disk icon which means, you guessed it: save.

Select the Optimize step in the list, and click the 'save' icon. You'll be prompted to name this new command, so call it 'Optimize 8'.



Done! Now with any raw artwork selected, you can optimise it by simply going to your commands menu and selecting your command in the list. For example:
Commands > Optimize 8

You will get a warning if you try to run this command without selecting the graphics first:



Important note: you can't optimise a symbol.. you can only optimise raw graphics. You must go into Symbol Edit mode to optimise the graphics within a symbol.
Finally, remember those red X's in the History panel? Those are steps that cannot be saved as Commands. It's usually because they're not definite steps with definable values.. in other words, they're different every time like brush strokes, select frames and so on.

Part 3 of this article will be setting a shortcut key for your new command.

2 Comments:

Anonymous said...

i liked all your animotds and brackenwood series . i wanted to ask you a question . how do you earn money by making flash movies ?

4:40 AM  
chluaid said...

I don't earn money with my own Flash movies (with the exception of my monthly google cheque), so I do the occasional freelance job to top up my bank account and pay some bills.

2:30 PM  

Post a Comment

Links to this post:

Create a Link

<< Home