<< Chapter < Page Chapter >> Page >

Changing the height of the image

If you grab the thumb with the mouse and move it to the left or the right, two obvious visual effects occur. The first is that the value representedby the current position of the thumb is displayed above the thumb as shown in Figure 3.

(As you will see later, the value is also displayed in a Flex 4 application, but by default the appearance is white numerals on a blackbackground.)

Changing the height of the image.

Missing image.
Changing the height of the image.

The second visual effect

The second visual effect of moving the thumb is that the height of the image changes to the value represented by the position of the thumb on the slider.

(An Image object has a property named maintainAspectRatio . By default, the value of this propertyis true. Therefore, when the height is changed, the width changes in a proportional manner.)

Note that the upper-left corner of the image remains anchored to the same point as the height of the image changes as shown in Figure 3.

Discussion and sample code

The Flex 3 project named SliderChangeEvent 01

Creating the layout

Once you create your new Flex 3 Project, there are at least three ways that you can create your layout using Flex Builder 3:

  1. Select the Design tab in the upper-middle panel of the IDE (see Figure 5) and drag your containers, controls, and other components from the Components tab onto your design window.
  2. Select the Source tab in Figure 5 and write the raw XML code that defines your layout.
  3. A combination of 1 and 2 above

Expose the components tab

When you select the Design tab in the upper-middle window of the IDE, the lower-left window changes to the appearance shown in Figure 4 with theFlex 3 (mx) Components tab exposed.

Flex builder 3 components tab exposed.

Missing image.
Flex Builder 3 Components tab exposed.
The list of available components that you see in Figure 4 also appears when you create a new project in Flash Builder 4 and specify the use ofthe Flex 3 compiler.

A list of available components

Although they aren't all shown in Figure 4 due to space limitations, the Flex Builder 3 Components tab lists all of the components that you can use in your Flex application grouped into the following categories:

  • Custom
  • Controls
  • Layout
  • Navigators
  • Charts

Expose the design window

Selecting the Design tab mentioned above also exposes the Flex Builder 3 designwindow shown in Figure 5.

Drag controls onto the flex builder 3 design tab.

Missing image.
Drag controls onto the Flex Builder 3 Design tab.
A similar design window is exposed when you create a new project in Flash Builder 4 specifying the Flex 3 compiler and then select the Design tab. The purpose is the same but some of the items at the top of the design window in Flash Builder 4 are different.

Drag components onto the Design tab

You can drag components from the Components tab shown in Figure 4 onto the Design tab shown in Figure 5 to create your layout in the Flex Builder 3design mode or in the Flash Builder 4 design mode. As you do that, the corresponding XML code is automatically generated for you.

Questions & Answers

what is mutation
Janga Reply
what is a cell
Sifune Reply
how is urine form
Sifune
what is antagonism?
mahase Reply
classification of plants, gymnosperm features.
Linsy Reply
what is the features of gymnosperm
Linsy
how many types of solid did we have
Samuel Reply
what is an ionic bond
Samuel
What is Atoms
Daprince Reply
what is fallopian tube
Merolyn
what is bladder
Merolyn
what's bulbourethral gland
Eduek Reply
urine is formed in the nephron of the renal medulla in the kidney. It starts from filtration, then selective reabsorption and finally secretion
onuoha Reply
State the evolution relation and relevance between endoplasmic reticulum and cytoskeleton as it relates to cell.
Jeremiah
what is heart
Konadu Reply
how is urine formed in human
Konadu
how is urine formed in human
Rahma
what is the diference between a cavity and a canal
Pelagie Reply
what is the causative agent of malaria
Diamond
malaria is caused by an insect called mosquito.
Naomi
Malaria is cause by female anopheles mosquito
Isaac
Malaria is caused by plasmodium Female anopheles mosquitoe is d carrier
Olalekan
a canal is more needed in a root but a cavity is a bad effect
Commander
what are pathogens
Don Reply
In biology, a pathogen (Greek: πάθος pathos "suffering", "passion" and -γενής -genēs "producer of") in the oldest and broadest sense, is anything that can produce disease. A pathogen may also be referred to as an infectious agent, or simply a germ. The term pathogen came into use in the 1880s.[1][2
Zainab
A virus
Commander
Definition of respiration
Muhsin Reply
respiration is the process in which we breath in oxygen and breath out carbon dioxide
Achor
how are lungs work
Commander
where does digestion begins
Achiri Reply
in the mouth
EZEKIEL
what are the functions of follicle stimulating harmones?
Rashima Reply
stimulates the follicle to release the mature ovum into the oviduct
Davonte
what are the functions of Endocrine and pituitary gland
Chinaza
endocrine secrete hormone and regulate body process
Achor
while pituitary gland is an example of endocrine system and it's found in the Brain
Achor
what's biology?
Egbodo Reply
Biology is the study of living organisms, divided into many specialized field that cover their morphology, physiology,anatomy, behaviour,origin and distribution.
Lisah
biology is the study of life.
Alfreda
Biology is the study of how living organisms live and survive in a specific environment
Sifune
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Introduction to xml. OpenStax CNX. Dec 02, 2014 Download for free at https://legacy.cnx.org/content/col11207/1.18
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Introduction to xml' conversation and receive update notifications?

Ask