MACROMEDIA FLEX-GETTING STARTED WITH FLEX Manuel d'utilisateur Page 100

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 148
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 99
<mx:String>megan5.jpg</mx:String>
</mx:Array>
<mx:List id="ctlImage" dataProvider="{images}"
selectedIndex="0" width="100" />
<mx:Image source="{ctlImage.selectedItem.valueOf()}"
height="200" />
</mx:Application>
At the top of the application is the list of images—in this case,
five images of my daughter Megan that I have included in the
project by dragging and dropping them into Flex Builder in the
src directory.
I then use an mx:List control to display the list of image names,
and an mx:Image tag to display the currently selected image.
Flex actually does the event handling to change the source of
the image for me when the list changes.
When I run this from Flex Builder I see something similar to
Figure 6-4.
Figure 6-4. The very simple image viewer
I can click on the list and see the different images that I have
placed in the src directory with the MXML application. The
84 | Chapter 6:More Flex Applications
Vue de la page 99
1 2 ... 95 96 97 98 99 100 101 102 103 104 105 ... 147 148

Commentaires sur ces manuels

Pas de commentaire