MACROMEDIA FIREWORKS 8-EXTENDING FIREWORKS Especificações Página 4

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 35
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 3
192
CHAPTER 11
Using the History panel to create a command
Not only does the History panel show the recent actions you’ve performed, it lets you save a sequence
of those actions as a Fireworks command file. Perform the following actions to create your first
Fireworks command:
1. Create a new document.
2. Draw a rectangle on the canvas and change its fill color.
3. Select the steps you just performed in the History panel, and then click the Save icon.
4. When prompted for a command name, enter Draw Rect (see Figure 11-1).
Figure 11‑1. Creating a simple command using the History panel
After saving the command, you should now have a new menu item available from the main toolbar’s
Commands menu. Try deleting your rectangle and executing the command you just created (select
Commands Draw Rect). If you saved the correct steps in your History panel, a new rectangle should
appear with the same specifications as the one you previously created.
What just happened?
Fireworks created a new JSF file and saved it to a special directory on your hard drive. The file contains
JavaScript code that performs the actions you selected in the
History panel. Fireworks sees this new
file and displays it in the list of commands in the
Commands menu. When you select the command
from the menu, the JavaScript within this file is interpreted and executed by the internal Fireworks
JavaScript interpreter. This process is similar to a web browser executing JavaScript, and then manipu-
lating the elements within its Document Object Model (DOM) based on the JavaScript. And, in the
same way that web browsers provide a DOM that can be interacted with via JavaScript (document.
getElementById(), for example), Fireworks exposes its DOM to be accessed via JavaScript.
Vista de página 3
1 2 3 4 5 6 7 8 9 ... 34 35

Comentários a estes Manuais

Sem comentários