Publishing this file now creates a Watch.swc file along the with SWF and HTML files. It is this
SWC file that we??™ll use to import the Watch into Flex Builder.
3. Publish the Flash file (File ?¤ Publish).
To bring the Watch into Flex Builder, we need to create a library path for it.
4. In Flex Builder, create a new project called FlashingFlex (New ?¤ Flex Project).
5. For this project, open the project??™s properties (Project ?¤ Properties).
6. In the Properties dialog box, select Flex Build Path and then Library Path (Figure 6-23).
7. Click Add SWC and browse to find the SWC file we published in Flash (Watch.swc).
8. Click OK to finish connecting the Watch to the Flex file.
The Watch MovieClip can now be used as a Flex component.
9. Bring out a Panel that will be used to hold the Watch. The Panel needs to be 380 pixels by 490
pixels to hold the Watch in its original scale, but the Watch can also be scaled if needed.
10. In the Source view, begin to type the MXML tag for the watch. Notice that as you begin to type
should read .
130
CHAPTER 6
Figure 6-23. Setting up the Flex Library build path
Figure 6-24. Watch MXML with code hinting
131
FLEX BUILDER AND FLASH
Jumping back to the Design view, you can see the Watch in its position (Figure 6-25).
Figure 6-25. Watch component in the Panel
11. Add a ControlBar from the Layout folder in the Components panel.
Pages:
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101