Prev | Current Page 127 | Next

LordAlex Leon, Greg Goralski

"Foundation Flex for Designers"


185
FLEX VIDEO GALLERY WITH DRAG-AND-DROP
4. Next we want to replace the assets in this folder with the assets that are provided for this chapter
in the code download for this book at www.friendsofed.com. The assets folder contains
the videos and the XML file that controls them. As you can see in Figure 9-12, it is structured
very much like the assets folder that we used in Chapter 8.
Figure 9-12. The assets file structure
The XML file is also structured the same way that the Chapter 8 XML was structured (Figure 9-13).
Figure 9-13. Videos XML file
5. Copy the assets folder from the code download directly over the assets folder in the video
gallery. This will overwrite the existing files and replace them with the new ones.
6. We will be doing quite a bit of editing of the MXML file and this is easiest in the Source view.
Switch to the Source view for the VideoGallery project. Since the name of the XML file has
changed, we will have to change the name of the XML file that is called by the HTTPService.
The new HTTPService will look like Figure 9-14.
Figure 9-14. Changed HTTPService
186
CHAPTER 9
7. We also need to change the XML at the point where we bring the values from the file into the
repeater. This is at the dataProvider. The existing dataProvider looks like Figure 9-15.
Figure 9-15. Original dataProvider
To make it work with our videos, change the code to look like Figure 9-16.
Figure 9-16. Changed dataProvider
You can see that everything stays the same but that instead of images, we put in videos (because that
is the way it??™s named in our XML) and we changed img to video.


Pages:
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
motoryzacja szkoła narciarska wyrejestrowanie samochodu legnica obciążniki Wczasy nad morzem