This tells Flex what kind of file it is.
Altering the file to work with video
For the next section, we can jump back to the Design view so that we can see visually what is happening.
The first thing that you will likely notice is that the thumbnail image icon is broken (Figure 9-17).
The image is broken because we are now trying to bring videos into it instead of images. An Image component
does not know how to deal with videos, so we are going to have to replace it with a VideoDisplay component.
8. Delete the existing Image component and replace it with a VideoDisplay component. Scale the
VideoDisplay component so that it??™s 50 by 50 pixels (Figure 9-18).
Figure 9-18. Thumbnails video
in place
Figure 9-17. Image component
with broken image icon
187
FLEX VIDEO GALLERY WITH DRAG-AND-DROP
9. We need to change many of the same properties settings for this component as we did for the
image thumbnails because many of the actions of this video will be the same as those for the image
thumbnails. First, set the source of the video to be taken from the repeater (which pulls them from
the XML), as shown in Figure 9-19. Also set Auto play to false. This keeps your thumbnail videos from
all playing at once and eating up the processor.
Figure 9-19. VideoDisplay source
10. We can also bring in our rollover effects in the same way as before. In the Category view of the
properties for this VideoDisplay component, set the rollOutEffect to {out} and the rollOverEffect
to {over}.
Pages:
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140