Home Page Icon
Home Page
Table of Contents for
ABOUT THE AUTHOR
Close
ABOUT THE AUTHOR
by Sas Jacobs
Foundation XML and E4X for Flash and Flex
Copyright
ABOUT THE AUTHOR
ABOUT THE TECHNICAL REVIEWER
ABOUT THE COVER IMAGE DESIGNER
ACKNOWLEDGMENTS
INTRODUCTION
1. INTRODUCTION TO XML
1.1. What is XML?
1.1.1. Understanding XML
1.1.2. Storing information in XML documents
1.1.3. XML, in the beginning
1.1.4. An XML example
1.2. Why XML?
1.2.1. Simple
1.2.2. Flexible
1.2.3. Descriptive
1.2.4. Accessible
1.2.5. Independent
1.2.6. Precise
1.2.7. Free
1.3. Why is XML important in Flash and Flex?
1.3.1. XML as a SWF data source
1.3.2. MXML in Flex
1.3.3. ActionScript 3.0 and XML
1.4. XML document sections
1.4.1. Document prolog
1.4.1.1. XML declaration
1.4.1.2. Processing instructions
1.4.1.3. Document Type Definitions
1.4.2. Document tree
1.4.3. Whitespace
1.4.4. Namespaces
1.5. Structuring XML documents
1.5.1. Elements
1.5.1.1. Writing elements
1.5.1.2. Naming elements
1.5.1.3. Populating elements
1.5.1.4. The first element
1.5.2. Attributes
1.5.2.1. Writing attributes
1.5.2.2. Naming attributes
1.5.2.3. Structuring attributes as elements
1.5.3. Text
1.5.4. Entities
1.5.5. Comments
1.5.6. CDATA
1.6. A simple XML document
1.7. Understanding well-formed documents
1.7.1. Element structure
1.7.2. Element nesting
1.7.3. Element closing
1.7.4. Element opening and closing tags
1.7.5. Quotes for attributes
1.7.6. Documents that aren't well-formed
1.8. XML, HTML, and XHTML
1.8.1. Understanding HTML
1.8.2. How is XML different from HTML?
1.8.3. Where does XHTML fit in?
1.9. Understanding related recommendations
1.9.1. Understanding DTDs and XML schemas
1.9.2. Understanding XSL
1.10. Summary
2. GENERATING XML CONTENT
2.1. Authoring XML documents in a text editor
2.1.1. Using text and HTML editors
2.1.2. Using XML editors
2.1.2.1. Using Stylus Studio 2008 XML
2.1.2.2. Working with Dreamweaver
2.2. Generating XML content from a database
2.2.1. Using a web server to generate XML content
2.2.2. Working with VB .NET
2.2.3. Working with PHP
2.2.4. Working with ColdFusion
2.3. Generating XML from other software packages
2.3.1. Getting started with XML in Excel 2007 and Word 2007
2.3.2. Generating XML from Word 2007
2.3.2.1. Creating an XML document in Word using Save As
2.3.2.2. Creating XML content in Word by using a schema
2.3.3. Generating XML from Excel 2007
2.3.3.1. Generating an XML document in Excel using Save As
2.3.3.2. Creating XML content in Excel using a schema
2.3.4. Creating XML content with Access 2007
2.4. Validation and XML content in SWF applications
2.5. Summary
3. ACTIONSCRIPT 3.0 AND XML
3.1. Differences between ActionScript 2.0 and 3.0
3.2. XML as an ActionScript data type
3.2.1. Writing XML inline within ActionScript
3.2.2. Writing XML with the XML tag in Flex
3.3. Overview of the new ActionScript 3.0 classes
3.3.1. The ActionScript 3.0 XML class
3.3.2. The XMLList class
3.3.3. The XMLListCollection class
3.3.4. The QName and Namespace classes
3.4. Working with the XML class
3.4.1. Properties of the XML class
3.4.1.1. Working with XML properties in Flash
3.4.1.2. Working with XML properties in Flex
3.4.2. Methods of the XML class
3.4.3. Locating XML content
3.4.3.1. Instructions for the code samples
3.4.3.2. Working with attribute() and attributes()
3.4.3.3. Finding child elements
3.4.3.4. Finding descendants
3.4.3.5. Finding elements
3.4.3.6. Finding the parent element
3.4.3.7. Locating text
3.4.4. Finding information about XML content
3.4.4.1. Finding an object's position within its parent
3.4.4.2. Determining content type
3.4.4.3. Determining the number of elements
3.4.4.4. Displaying the name of an element
3.4.4.5. Determining the type of node
3.4.4.6. Displaying a string representation of XML
3.4.5. Modifying XML content
3.5. Working with the XMLList class
3.6. Working with the XMLListCollection class in Flex
3.6.1. Setting up the Flex application
3.6.2. Using a function to filter an XMLListCollection
3.6.3. Sorting an XMLListCollection
3.7. Understanding the Namespace class
3.8. Understanding the QName class
3.9. Limitations of working with the XML class
3.10. Summary
4. USING E4X EXPRESSIONS
4.1. Understanding E4X expressions
4.1.1. Working through the examples
4.1.1.1. Working with Flash
4.1.1.2. Working with Flex
4.1.2. Using the dot operator to specify a path
4.1.2.1. Returning text
4.1.2.2. Returning an XMLList
4.1.2.3. Specifying an index
4.1.2.4. Finding the last element
4.1.2.5. Casting returned content
4.1.2.6. Using the wildcard operator (*)
4.1.3. Using the attribute operator (@)
4.1.4. Looping through attributes
4.1.5. Using the descendants operator (..)
4.2. Working with filter expressions
4.2.1. Working with equality
4.2.2. Finding inequality
4.2.3. Other comparisons
4.2.4. Using AND and OR in conditions
4.2.5. Using the additive operator (+)
4.2.6. Including other ActionScript expressions
4.3. Assigning values
4.3.1. Simple assignment with =
4.3.2. Compound assignment with +=
4.4. Deleting content
4.5. E4X in action
4.5.1. Flash example
4.5.2. Flex example
4.6. Summary
5. USING THE URLLOADER CLASS WITH XML DOCUMENTS
5.1. Using the URLLoader class
5.1.1. Properties of the URLLoader class
5.1.2. Methods of the URLLoader class
5.1.3. Events of the URLLoader class
5.1.4. Limits of the URLLoader class
5.2. Putting it all together
5.2.1. Creating a URLLoader object
5.2.2. Making the request
5.2.3. Sending variables with the request
5.2.4. Tracking the progress of a request
5.2.5. Receiving a response
5.2.6. Detecting errors
5.2.7. Working through examples
5.2.7.1. Working in Flash
5.2.7.2. Working in Flex
5.3. Updating content with the URLLoader class
5.3.1. Sending variables in a Flash application
5.3.2. Sending variables in a Flex application
5.4. Understanding Flash Player security
5.4.1. Understanding security sandboxes
5.4.2. Creating a cross-domain policy file
5.4.2.1. Writing a cross-domain policy file
5.4.2.2. Issues with the cross-domain policy file
5.4.3. Proxying data locally
5.5. Summary
6. LOADING METHODS SPECIFIC TO FLEX
6.1. Loading external content
6.2. Using the <mx:HTTPService> tag
6.2.1. Properties of the <mx:HTTPService> tag
6.2.2. Methods of the <mx:HTTPService> tag
6.2.3. Events of the <mx:HTTPService> tag
6.2.4. Putting it all together
6.2.4.1. Creating an HTTPService request
6.2.4.2. Making the request
6.2.4.3. Sending variables with the request
6.2.4.4. Specifying a return type
6.2.4.5. Specifying a request method
6.2.4.6. Receiving a response
6.3. Using the HTTPService class
6.3.1. Properties, methods, and events of the HTTPService class
6.3.2. Putting it all together
6.3.2.1. Creating an HTTPService request
6.3.2.2. Making the request
6.3.2.3. Sending variables with the request
6.3.2.4. Specifying a return type
6.3.2.5. Specifying a request method
6.3.2.6. Receiving a response
6.4. Accessing loaded content
6.4.1. Accessing the lastResult property directly
6.4.2. Binding the lastResult property
6.5. Working through an <mx:HTTPService> tag example
6.6. Working through an HTTPService class example
6.7. Passing variables with the request
6.7.1. Using <mx:request> to send variables
6.7.2. Sending variables with the HTTPService class
6.8. Summary
7. LOADING METHODS SPECIFIC TO FLASH
7.1. Understanding the AS 2.0 data components
7.2. Understanding the XMLConnector
7.2.1. Displaying read-only XML content
7.2.2. Displaying updatable XML data
7.3. Configuring the XMLConnector
7.3.1. Using the Component Inspector
7.3.1.1. Creating a schema from an XML document
7.3.1.2. Creating a schema by adding fields
7.3.1.3. Understanding schema settings
7.3.2. Triggering the XMLConnector component
7.3.3. Testing for a loaded XML document
7.3.4. Working through a loading example
7.4. Binding XML data directly to UI components
7.4.1. Adding a binding
7.4.2. Configuring the binding
7.4.2.1. Working through a binding example
7.4.2.2. Extending the binding example
7.5. Using the DataSet component
7.5.1. Creating bindings with a DataSet component
7.5.2. Putting it all together
7.6. Summary
8. MODIFYING XML CONTENT WITH ACTIONSCRIPT 3.0
8.1. Setting up the examples
8.1.1. Setting up the Flash examples
8.1.2. Setting up the Flex examples
8.2. Changing element and attribute values
8.3. Adding, editing, and deleting XML content
8.3.1. Using appendChild()
8.3.2. Using prependChild()
8.3.3. Copying a node
8.3.4. Inserting a child node
8.3.5. Editing content
8.3.6. Using setChildren()
8.3.7. Deleting an element
8.4. Modifying element names and namespaces
8.4.1. Adding a namespace
8.4.2. Removing a namespace
8.4.3. Setting the namespace
8.4.4. Changing the local element name
8.4.5. Changing the qualified element name
8.5. Working through a modification example
8.5.1. Working in Flash
8.5.2. Working in Flex
8.5.3. Points to note about the example
8.6. Summary
9. COMMUNICATING WITH THE SERVER
9.1. Sending data to the server
9.1.1. Structuring the file path
9.1.2. Sending the variables
9.1.2.1. Choosing a method
9.1.2.2. Choosing the format
9.2. Working with the URLLoader class
9.2.1. Sending variables with the URLLoader class
9.2.2. Receiving a response
9.2.3. Handling errors
9.2.4. Working through a URLLoader class example
9.2.4.1. Understanding the VB .NET page
9.2.4.2. Understanding the PHP page
9.2.4.3. Understanding the ColdFusion page
9.2.4.4. Working through the Flash example
9.2.4.5. Working through the Flex example
9.2.4.6. Working with the <mx:HTTPService> element
9.3. Sending variables with the <mx:HTTPService> element
9.3.1. Receiving a response
9.3.2. Handling errors
9.3.3. Working through an <mx:HTTPService> element example
9.4. Working with the HTTPService class in Flex
9.4.1. Sending variables with the HTTPService class
9.4.2. Receiving a response
9.4.3. Handling errors
9.4.4. Working through a HTTPService class example
9.5. Choosing the Flex approach
9.6. Summary
10. CONSUMING WEB SERVICES WITH FLEX
10.1. Understanding web services
10.1.1. Understanding SOAP web services
10.1.2. Understanding the role of WSDL
10.2. Using Flex to consume a web service
10.3. Working with the <mx:WebService> element
10.3.1. Creating the web service request
10.3.2. Specifying the operation
10.3.3. Making the request
10.3.4. Receiving the response
10.3.5. Accessing the reply
10.3.6. Understanding the resultFormat of an operation
10.3.7. Handling errors
10.3.8. Working through a tag-based example
10.4. Working with the WebService class
10.4.1. Properties of the WebService class
10.4.2. Methods of the WebService class
10.4.3. Events of the WebService class
10.4.4. Understanding the Operation class
10.4.5. Properties of the Operation class
10.4.6. Methods of the Operation class
10.4.7. Events of the Operation class
10.5. Consuming a web service with ActionScript
10.5.1. Creating the web service request
10.5.2. Specifying the operation
10.5.3. Making the request
10.5.4. Receiving the response
10.5.5. Accessing the reply
10.5.6. Understanding returned data types
10.5.7. Handling errors
10.5.8. Working through a scripted example
10.6. Using Flex Builder to manage web services
10.6.1. Working through the Web Service Introspection wizard
10.6.2. Managing web services
10.6.3. Consuming the web service
10.6.3.1. Using MXML tags with the generated classes
10.6.3.2. Scripting the generated classes
10.7. Summary
11. CONSUMING WEB SERVICES WITH FLASH
11.1. Consuming web services with the URLLoader class
11.1.1. Understanding the WSDL file
11.1.2. Using GET to consume a web service
11.1.2.1. Working through a GET example
11.1.3. Consuming a web service with POST
11.1.3.1. Working through a POST example
11.1.4. Consuming a SOAP web service with the as3webservice extension
11.1.4.1. Working through an as3webservice example
11.2. Consuming a SOAP web service with the WebServiceConnector component
11.2.1. Configuring the WebServiceConnector
11.2.1.1. Adding parameters
11.2.1.2. Determining the arguments for the operation
11.2.1.3. Adding parameter bindings
11.2.1.4. Triggering the web services call
11.2.1.5. Binding the results
11.2.1.6. Accessing the results in ActionScript
11.2.2. Viewing the Web Services panel
11.2.3. Working through a WebServiceConnector example
11.3. Summary
12. FLASH CASE STUDY
12.1. Understanding Flickr
12.1.1. Applying for a Flickr key
12.1.2. Making a Flickr request
12.1.3. Understanding the Flickr API
12.1.3.1. Understanding the returned photo XML document
12.1.3.2. Understanding the returned people XML document
12.1.3.3. Finding recent photos
12.1.3.4. Finding interesting photos
12.1.3.5. Searching for photos
12.1.3.6. Finding owner information
12.1.4. Receiving a Flickr response
12.1.4.1. Receiving photo information
12.1.4.2. Receiving person information
12.1.4.3. Finding the URL of a photo
12.1.4.4. Finding the page containing the photo
12.2. Building the application
12.2.1. Working through the interface
12.2.2. Setting up the application
12.2.3. Getting the recent photos list
12.2.4. Displaying a large image and title
12.2.5. Adding paging functionality
12.2.6. Making cosmetic changes to the interface
12.2.7. Viewing interesting photos
12.2.8. Searching Flickr
12.2.9. Showing owner information
12.3. Summary
13. FLEX CASE STUDY
13.1. Understanding Adobe Kuler
13.1.1. Applying for a Kuler key
13.1.2. Understanding the Kuler feeds
13.1.2.1. Accessing an existing feed
13.1.2.2. Searching Kuler
13.1.3. Receiving a Kuler response
13.2. Building the application
13.2.1. Working through the interface
13.2.2. Setting up the application
13.2.3. Creating the custom class file
13.2.4. Getting the highest rated themes
13.2.5. Displaying the theme
13.2.6. Adding paging functionality
13.2.7. Displaying the most popular schemes
13.2.8. Searching Kuler
13.2.9. Reviewing the completed code
13.2.9.1. KulerLoader.as
13.2.9.2. ColorSwatch.mxml
13.2.9.3. KulerCompleted.mxml
13.3. Summary
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Copyright
Next
Next Chapter
ABOUT THE TECHNICAL REVIEWER
ABOUT THE AUTHOR
When she's not working, Sas loves traveling, photography, running, and her son.
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset