Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
In this chapter we're going to be working with components. For this movie, we'll talk about what components are and how you can add them to your Flash applications. If you're following along, I'm working in 01_Understanding_Components.fla in the Chapter 07 folder in the Exercise Files folder. Components are prebuilt Flash widgets that you can use to add interactivity fairly simply to your Flash documents. Let's take a look at how you can use components. Components are stored in the Components panel. To access the Components panel choose Window, Components.
In the Components panel you'll see two categories: User Interface and Video. You can expand or collapse them by clicking the arrows to the left of the Component category name. The components here are for it adding elements to a User Interface. We have a Button, CheckBox, ColorPicker, ComboBox, DataGrid, Label, List, etc. A lot of these elements can be used inside of a form or another Flash application. Let's take a look at how components work in general. Click and drag a button component from the components panel onto the stage.
Once you do that, you can close the Components panel. Deselect the button component on the stage by clicking away from the component. Notice in your library that there's a button symbol with a type of component. Now you may not be able to see this, you might have to move your library little bit, but you can see on my screen that the button is a component. And I resize the Type field by clicking and dragging in between the Name and Type field and library. Also inside of the library you'll see a folder called Component Assets and into that folder are some movie clips that make up the component on the stage. We'll talk more about that later on when we talk about customizing our components.
For now, let's talk about how we can actually use a component. On the stage the button component has a label of Label. Let's select the button component and talk about how we can modify something called parameters to change the label on a button. When you have a component selected, you can click the Parameters tab at the bottom of the screen to find parameters or properties of the component that you can modify. For example, if we wanted to change the label of our component, in the Label area we can click the label field and type New Label, or Submit if we wanted to do this for a form.
And now the label says Submit. So in the Parameters tab is where you modify properties of your component. Throughout this chapter we'll use a few components to build a simple form and we'll add ActionScript to make our form send an email.
Get unlimited access to all courses for just $25/month.Become a member
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.