O'Reilly logo

Foundation Fireworks CS4 by Hugh Griffith, Matthew Keefe, Chuck Mallott, Matt Heerema, Craig Erskine, Grant Hinkson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required