<< Chapter < Page Chapter >> Page >

Figure 5 shows the result of allowing the mouse pointer to hover over the leftmost button.

Mouse pointer hovering over the leftmost button.

Missing image
Mouse pointer hovering over the leftmost button.

Hovering over the button with the mouse pointer causes the button to switch to the overSkin style exposing the top image in the second column in Figure 1.

Note that the rightmost button has been toggled from frog skins to butterfly skins in Figure 5.

Mouse pointer pressed on the leftmost button

Figure 6 shows the result of pointing to the leftmost button and pressing the left mouse button.

Mouse pointer pressed on the leftmost button.

Missing image
Mouse pointer pressed on the leftmost button.

This causes the button to switch to the downSkin style exposing the top image in the third column in Figure 1.

Discussion and sample code

Skins01 project file structure

Figure 7 shows the project file structure for the Flex project named Skins01.

Skins01 project file structure.

Missing image
Skins01 project file structure.

The image in Figure 7 was captured from the Flex Navigator panel in the Flex Builder 3 IDE.

Eight images

The eight images shown in Figure 1 are listed in the Images folder in Figure 7.

Three custom button classes

The three custom button classes and the driver class illustrated by Figure 2 through Figure 6 are listed in the CustomClasses folder in Figure 7.

The MXML application file

And of course, the Flex MXML file is shown as Skins01.mxml in Figure 7.

Custom button classes are very similar

The three custom button classes are very similar. The class named FancyButton is the most complex of the three. Therefore, I will explain the class named FancyButton in detail but I won't explain the other two custom button classes.

In addition, I will explain the MXML file named Skins01.mxml and the class file named Driver.as .

Will explain in fragments

I will explain the code in fragments. Complete listings of all of the source code files are provided in Listing 8 through Listing 12 near the end ofthe lesson.

The file named Skins01.mxml

A complete listing of this file is shown in Listing 1. In addition, a complete listing is also provided in Listing 8 near the end of the lesson alongwith the code for all of the other files in this application.

Complete listing for skins01.mxml.

<?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"xmlns:cc="CustomClasses.*"><cc:Driver/></mx:Application>

The code in Listing 1 couldn't be simpler. It declares a namespace for the folder containing the four class files in Figure 7 and instantiates anobject of the class named Driver . In this case, the Flex application is simply serving as a launch pad for the ActionScript program.

The file named Driver.as

The class named Driver begins in Listing 2. A complete listing of this class file is provided in Listing 9 near the end of the lesson.

Beginning of the class named driver.

package CustomClasses{ import flash.events.*;import mx.containers.HBox;public class Driver extends HBox{private var bFlyButton:ButterflyButton = new ButterflyButton();private var frogButton:FrogButton = new FrogButton(); private var fancyButton:FancyButton =new FancyButton();

Questions & Answers

are nano particles real
Missy Reply
yeah
Joseph
Hello, if I study Physics teacher in bachelor, can I study Nanotechnology in master?
Lale Reply
no can't
Lohitha
where we get a research paper on Nano chemistry....?
Maira Reply
nanopartical of organic/inorganic / physical chemistry , pdf / thesis / review
Ali
what are the products of Nano chemistry?
Maira Reply
There are lots of products of nano chemistry... Like nano coatings.....carbon fiber.. And lots of others..
learn
Even nanotechnology is pretty much all about chemistry... Its the chemistry on quantum or atomic level
learn
Google
da
no nanotechnology is also a part of physics and maths it requires angle formulas and some pressure regarding concepts
Bhagvanji
hey
Giriraj
Preparation and Applications of Nanomaterial for Drug Delivery
Hafiz Reply
revolt
da
Application of nanotechnology in medicine
has a lot of application modern world
Kamaluddeen
yes
narayan
what is variations in raman spectra for nanomaterials
Jyoti Reply
ya I also want to know the raman spectra
Bhagvanji
I only see partial conversation and what's the question here!
Crow Reply
what about nanotechnology for water purification
RAW Reply
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
Damian
yes that's correct
Professor
I think
Professor
Nasa has use it in the 60's, copper as water purification in the moon travel.
Alexandre
nanocopper obvius
Alexandre
what is the stm
Brian Reply
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
Rafiq
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
Damian
How we are making nano material?
LITNING Reply
what is a peer
LITNING Reply
What is meant by 'nano scale'?
LITNING Reply
What is STMs full form?
LITNING
scanning tunneling microscope
Sahil
how nano science is used for hydrophobicity
Santosh
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
Rafiq
what is differents between GO and RGO?
Mahi
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
Rafiq
if virus is killing to make ARTIFICIAL DNA OF GRAPHENE FOR KILLED THE VIRUS .THIS IS OUR ASSUMPTION
Anam
analytical skills graphene is prepared to kill any type viruses .
Anam
Any one who tell me about Preparation and application of Nanomaterial for drug Delivery
Hafiz
what is Nano technology ?
Bob Reply
write examples of Nano molecule?
Bob
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
Is there any normative that regulates the use of silver nanoparticles?
Damian Reply
what king of growth are you checking .?
Renato
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Good
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, Object-oriented programming (oop) with actionscript. OpenStax CNX. Jun 04, 2010 Download for free at http://cnx.org/content/col11202/1.19
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Object-oriented programming (oop) with actionscript' conversation and receive update notifications?

Ask