11.4. Building a functional UI in Flash
The Draw Rect sample covered just the basics. You saw how to execute JSF from a command panel, but the panel didn't provide any enhanced functionality at all. It performed the exact same action as the Draw Rect.jsf run from the Commands menu. Let's build on the Draw Rect sample and create a functional UI.
The scenario: Update the Draw Rect UI to include left, top, height, width, and cornerRadius TextBlocks and a ColorPicker component. To support this behavior, we need to update the JSF, converting the inline code into a function that can be called.
In the following JSF code, we've created a function named CreateRectangle that accepts all of these values as parameters:
// Test the CreateRectangle Function ...
Get Foundation Fireworks CS4 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.