MACROMEDIA FIREWORKS 8-EXTENDING FIREWORKS Specifiche Pagina 18

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 35
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 17
206
CHAPTER 11
option on this tab. When enabled, the FDT will watch for file changes and automatically perform the
conversion in the background. When you step back to Flash, you don’t have to remember to click
convert in the FDT.
Figure 11‑9. FDT ActionScript conversion
Following is the original CreateRectangle function introduced earlier in the chapter, housed in Draw
Rect.jsf:
function CreateRectangle(left, top, width, height, cornerRadius, color)
{
var rect = new Object();
rect.left = left;
rect.top = top;
rect.right = left + width;
rect.bottom = top + height;
fw.getDocumentDOM().addNewRectanglePrimitive(rect, cornerRadius);
fw.getDocumentDOM().setFillColor(color);
}
The following code listing shows the contents of Draw Rect.as after being converted to an ActionScript
variable using FDT:var jsfCode:String = "":
+ "function CreateRectangle(left, top, width, height,
cornerRadius, color)\n"
+ "{\n"
+ " var rect = new Object();\n"
Vedere la pagina 17
1 2 ... 13 14 15 16 17 18 19 20 21 22 23 ... 34 35

Commenti su questo manuale

Nessun commento