200 likes | 417 Views
Chapter 13. Working with Components. Chapter 13 Lessons. Use Components in a Flash Movie Use Components in a Form. Work with Components. There are three categories of components: User Interface ( UI ) Video Flex. Work with Components.
E N D
Chapter 13 Working with Components
Chapter 13 Lessons • Use Components in a Flash Movie • Use Components in a Form
Work with Components • There are three categories of components: • User Interface (UI) • Video • Flex
Work with Components • 1. User Interface (UI)—Components (such as buttons and menus) that are used to create the visual interface for a Flash application.
Work with Components • 2. Video—Components used to insert an flv video file into a Flash document and allow the user to control the playback video
Work with Components • 3. Flex—Contains the FlexComponentBase class that is used to develop and deploy cross-platform applications
Work with Components • Introduction • You can use components for creating check boxes, drop-down menus, and forms with boxes for entering user data • You can add functionality to a movie by dragging and dropping components from the Components panel to the Stage • You are not required to enter ActionScript code when using components
Work with Components • However, you can use ActionScript to enhance the functionality of a component • In addition to the components provided in Flash, you can obtain other components from third-party companies and individuals
Use Components in a Flash Application Each component name and icon provides a clue to its type, such as Button, CheckBox, and ScrollPane. Components panel showing the User Interface Components
Use Components in a Flash Application • Many of the User Interface Components are used as part of forms that can gather data from a user. • The UILoader Component can load external .jpg graphic files and .swf movie files. • You can load these files from a folder, using a relative or an absolute path.
Use Components in a Flash Application • When you load the files from a folder, it will reduce the size of the movie and allow you to easily update website content by simply changing the .jpg or .swf files on the external site. • You can load files using ActionScript or by using the UILoader.
Use Components in a Flash Application • Depending on the type of component used, you will need to specify one or more of the following parameters: • source—This parameter is used to specify the location for the content that is to be displayed using the component • scaleContent—This parameter can be turned on and off. If it is on the content will automatically resize to the size of the component. If it is off, the UILoader will be scaled to the smaller size associated with the object.
Use Components in a Flash Application • Parameters Continued… • autoLoad—This parameter can be turned on and off. If it is turned on, the Component will automatically display the specified contents. If it is turned off, the contents will not be displayed until some other action you specify, such as a button click, occurs • label—This parameter allows you to type a text label
Use Components in a Flash Application The completed Component parameters
Use Components in a Flash Application • To use a Component: • Select the frame and layer where the component will be placed • Drag the component from the Components panel to the desired location on the Stage • Use the Properties panel to set the component parameters
Use Components in a Form • Flash provides several Components that can be used to create forms. • Survey • Registration form • Use in: • Websites • Applications
Use Components in a Form Sample Form
Use Components in a Form • The Process for Developing a Form • Plan out the form including: • each Component to be used • its location • Drag each Component to the Stage • Position Component as desired
Use Components in a Form • Once a Component is placed and while it is selected, use the Properties panel to: • Change its properties, such as the size • Specify other properties, such as labels and values
Use Components in a Form Change component settings in the Properties dialog box