
201
EXTENDING FIREWORKS: DEVELOPING AN EFFECTIVE WORKFLOW USING JAVASCRIPT AND FLASH
Figure 11-6 shows the new layout with all of the NumericSteppers in place. We’ve also added labels
to make it clear what each control represents and some moderate styling to give this panel a little
personality.
Figure 11‑6. Updated panel layout in Flash
Using a NumericStepper instead of a TextInput component will let us enforce certain value
ranges—you don’t want someone entering “thirty” for the width, for example. For all of the controls
besides nsCornerRadius, set the minimum property to
0 and the maximum property to 10,000. For
nsCornerRadius, set the minimum to
0 and maximum to 100. Even though the CreateRectangle
function expects a cornerRadius in the 0–1 range, we think users will expect a value in the 0–100
range. A simple division by 100 will take care of the discrepancy. Figure 11-7 shows the Component
inspector in Flash with the nsCornerRadius NumericStepper control selected.
Figure 11‑7. Setting NumericStepper values
via the Component inspector
Kommentare zu diesen Handbüchern