To create this kind of deeper interlacing we need to use the Flex
Component Kit (also known as the Flash Integration Kit) that we installed at the start of this chapter.
Integrating Flash and Flex in a deeper way
In the files for this chapter you??™ll find a Flash FLA file called watch.fla.
1. Copy this file to your desktop and open it in Flash.
In the Library of the file is the kind of MovieClip that you might expect to be used in an online store.
The MovieClip contains four images of a watch at different angles, each on its own labeled keyframe
(Figure 6-21).
Figure 6-21. Four keyframes of the Watch MovieClip in Flash
129
FLEX BUILDER AND FLASH
Our goal in this example is to bring the MovieClip into Flex and have it respond to Flex events. In this
way a Flex event, such as a button click or state change, can affect the angle of the watch.
Adding the Flex Component Kit has created a new command in Flash: Make Flex Component (Figure 6-22).
Figure 6-22. Make Flex Component command,
added by the Flex Component Kit
It is this command that lets us create the watch MovieClip as a Flex component and modify it through
Flex events.
2. Select the Watch MovieClip in the Flash Library and select the command Make Flex Component
(Commands ?¤ Make Flex Component).
This does a series of things. First, it changes the frame rate to 24 fps, the frame rate at which Flex
operates, if it is different. It also turns Export SWC on and imports FlexComponentBase into the Flash
Library.
Pages:
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100