<< Chapter < Page Chapter >> Page >

This causes the material shown in Figure 2 to be displayed in the system console window each time the Flash Player gains and then loses the operatingsystem focus.

Listing 3 also signals the end of the class and the end of the program named ActivateEvent01 .

The program named Effects03

This is a much more substantial program, which is based on a program in the Flex documentation . That program is written mostly in Flex MXML and contains the minimum amount of ActionScript code necessary to provide thedesired behavior.

Online versions of the two programs

An online executable version of the program is available following the source code listing at the above site . I encourage you to run it and observe its behavior.

This version of the program is written almost entirely in ActionScript and contains only enough Flex MXML to make it possible to launchthe program from within an HTML document. I also encourage you to run this version and observe its behavior.

Project file structure for Effects03

The project file structure for the program is shown in Figure 3, which shows a snapshot of the Flex Builder 3 Navigator panel.

Project file structure for effects03.

Missing image
Project file structure for Effects03.

Screen display at startup

The screen display at startup is shown in Figure 4.

Screen display at startup.

Missing image
Screen display at startup.

A creationComplete event

By the time that the snapshot shown in Figure 4 was taken, the application had already dispatched a creationComplete event and the event handler registered to listen for that event had caused the text "Creation Complete!" tobe displayed in a TextArea object near the top of the browser window.

What is a creationComplete event?

According to the documentation , this event is dispatched "when the component has finished its construction, property processing, measuring, layout, and drawing." Therefore, other than the fact that the user starts the program running, thedispatching of this event type is completely beyond the control of the user.

Behavior of the program

This program uses a Resize object from the mx.effects package to cause the size of the image of the penguin shown in Figure 4 to be reduced to one-fourth of its original size over a period of 10seconds when the user clicks the Start button shown at the bottom of Figure 4.

The behavior of the effect resulting from clicks on the other buttons at the bottom of Figure 4 generally matches the labels on the buttons.

Screen display after clicking Start and Pause

Figure 5 shows the screen display after clicking the Start button, allowing the effect to run for a few seconds, and then clicking the Pause button.

Screen display after clicking start and pause.

Missing image
Screen display after clicking Start and Pause.

Servicing an effectStart event

As you will see later, clicking the Start button causes a method named play to be called on an object of the Resize class.

The Resize object dispatches an effectStart event whenever it starts playing an effect. An event handler, registered on the Resize object, causes the text "Effect Started!" to be displayed in the text area near the top of Figure 5.

Questions & Answers

Application of nanotechnology in medicine
what is variations in raman spectra for nanomaterials
Jyoti Reply
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
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
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
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
Stoney Reply
why we need to study biomolecules, molecular biology in nanotechnology?
Adin Reply
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
Adin
why?
Adin
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
anyone know any internet site where one can find nanotechnology papers?
Damian Reply
research.net
kanaga
sciencedirect big data base
Ernesto
Introduction about quantum dots in nanotechnology
Praveena Reply
hi
Loga
what does nano mean?
Anassong Reply
nano basically means 10^(-9). nanometer is a unit to measure length.
Bharti
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get the best Algebra and trigonometry course in your pocket!





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