Prev | Current Page 126 | Next

LordAlex Leon, Greg Goralski

"Foundation Flex for Designers"


Figure 9-7. Adding data to the List component
182
CHAPTER 9
9. Run the application to see how the drag-and-drop works. Notice that in this example, we can
move the text from any list around multiple times and have control over where in the list our
dropped text goes (Figure 9-8).
Figure 9-8. Drag-and-drop with List components
Also notice that Flex lets you know when you are over an area that is not a suitable drop area by displaying
a red x icon.
Manually adding drag-and-drop support
Instead of starting from scratch for the next example, let??™s use what we have already built. Since this
application is going to be very similar in layout to the photo gallery from Chapter 8, let??™s create a copy
of that project to work from.
183
FLEX VIDEO GALLERY WITH DRAG-AND-DROP
1. To create a copy of a project, right-click on the existing project (Control-click on a Mac) and
select Copy (Figure 9-9).
Figure 9-9. Copying an existing application
2. Right/Control-click again and select
Paste. You will be given the option
to rename the project and change
its location (Figure 9-10). Rename it
VideoGallery. This renames the
folder for the application but not
the name of the default MXML file.
Figure 9-10. Renaming the application
184
CHAPTER 9
3. To change the MXML file name, right/Control-click on the existing file name and select Rename.
Rename the file VideoGallery (Figure 9-11).
Figure 9-11. Renaming the MXML file
We can leave the CSS file named as it is to keep things simpler.


Pages:
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
Lisa Marie Experience Morcheeba tworzenie stron Katowice Richard Marx Lynyrd Skynyrd