<< Chapter < Page Chapter >> Page >

The project that I explained in the earlier lesson was created using Flex Builder 3. The project that I willexplain in this lesson was created using Flash Builder 4.

Free for educational use

As of June 2010, Adobe provides free copies of Adobe Flash Builder 4 Standard to:

  • Students, faculty and staff of eligible educational institutions
  • Software developers who are affected by the current economic condition and are currently unemployed
  • Event attendees who receive a special promotional code at their event

Skeleton mxml code and namespaces

Skeleton mxml code for a new Flex 3 project

When you create a new Flex 3 project in Flex Builder 3 or Flash Builder 4, a skeleton of the required mxml file is created for you. Listing 1 shows thecontents of such a skeleton mxml file for a Flex 3 project.

Skeleton mxml code for a new flex 3 project.

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

Created using Flex Builder 3

The skeleton code shown in Listing 1 was created using Flex Builder 3, but the skeleton code for a Flex 3 project is essentially the same regardless ofwhether it is created using Flex Builder 3 or Flash Builder 4. (Flash Builder 4 inserts a couple of relatively insignificant size attributes that are not inserted by FlexBuilder 3.)

The namespace (xmlns) attribute

In the earlier lesson, I explained the concept of the root element , and I explained that the term xmlns is the required name for a namespace attribute. (This is true for XML in general and not just for Flex mxml.) While it isn't necessary in general to include a namespace attribute in the root element, when a namespace attribute is included in the root element, it becomes the default namespace for the entire document.

Namespace is always required for a Flex project

Even though it isn't necessary to include a namespace attribute in the root element of a general XML document, it is always necessary to include the namespace attribute shown in Listing 1in the root element of the main mxml document for a Flex 3 project. That is why Flex Builder 3 includes it in the skeleton code for the project.

What does this mean?

The inclusion of the default namespace attribute shown in Listing 1 means that all elements with names that refer to componentsfrom the standard Flex 3 library of components must be prefixed with "mx:" .

Skeleton mxml code for a new Flex 4 project

As with a Flex 3 project, when you create a new Flex 4 project in Flash Builder 4, a skeleton of the mxml file is created for you. Listing 2 shows thecontents of such a skeleton mxml file for a Flex 4 project.

Skeleton mxml code for a new flex 4 project.

<?xml version="1.0" encoding="utf-8"?><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955"minHeight="600"><fx:Declarations><!-- Place non-visual elements (e.g., services, value objects) here --></fx:Declarations></s:Application>

Questions & Answers

what is a deadweight loss? how monopoly creates a deadweight loss?
Ashraf Reply
who are u?
Lamine
haha
Cleaford
scarm
nura
what it this
Cleaford
hi y'all
Dope
how does group chat help y'all 🤔
Dope
hi y'all
Dope
how does group chat help y'all 🤔
Dope
how does group chat help y'all 🤔
Dope
to learn from one another
Lamine
oh okay
Dope
😟
Creative
Yes
Lamine
what is type of economic
taiwo Reply
how to understand basics of economics
Aarif Reply
what is demand schedle
Princess Reply
When you make a Scedule of the demand you made
Rodeen
this is helpful for rbi grade b
Prema Reply
What is macroeconomics
Kauna Reply
It's one of the two branches of Economics that deal with the aggregate economy.
Mayen
it's about inflation, occupation, gdp and so on
alberto
What is differences between Microeconomics and Macroeconomic?
Bethrand
a price floor of 24 imposed
Annie Reply
monopolistic competition
bintu Reply
yap
nura
any one there to answer my question
Richard Reply
Fixed Costs per week Variable Costs per bear Rent & Rates of Factory Hire & machines Heating & Lighting Repayment of Bank Loan K100.00 K45.00 K5.00 K50.00 Materials Foam Wages K6.00 K1.00 K1.00 Total K200.00 K8.00
Richard
one of the scarce resources that constrain our behaviour is time. each of us has only 24 hours in a day. how do you go about allocating your time in a given day among completing alternatives? once you choose a most important use of time. why do you not spend all your time to it. use the notion of op
naknak Reply
mohsina mala..Bangla app hobe na
Dipam Reply
mani Baba. First learn the spelling of Economics
Dipam Reply
Economics- The study of how people use their limited resources to tey and satisfy unlimited wants.
Kelly
hmmm
Mani
etar bangla apps hobe na?
Mohsina
what is defination of acnomics
Mani Reply
বাংলা বই পাওয়া যায় না?
Mohsina Reply
what is a commdity
Ruth Reply
Difference between extinct and extici spicies
Amanpreet Reply
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, 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