In previous examples, “Creating a simple image gallery with the Flex TileList control” and “Creating a simple image gallery with the Flex HorizontalList control”, we saw how you could create a simple image gallery using the TileList and HorizontalList controls.
The following example shows how you can load XML files using the HTTPService tag so that you can dynamically load different galleries.
Full code after the jump.
Continue reading ‘Dynamically loading XML files using the HTTPService tag’
The followig example shows how you can pass parameters to an HTTPService by passing an Object in the HTTPService’s send() method. The remote ColdFusion script is a simple “hello world” type script which accepts a single parameter, “name”, and returns a single parameter, “welcomeMessage”.
Full code after the jump.
Continue reading ‘Passing parameters to an HTTPService’
Similar to the previous post, “Converting XML to objects using the Flex HTTPService MXML tag“, the following example shows how you can use the decodeXML() method in the SimpleXMLDecoder class to convert an XMLDocument object into an ActionScript Object object.
Full code after the jump.
Continue reading ‘Converting XML to objects using the Flex SimpleXMLDecoder class’
The following example shows how you can convert an XML file loaded at run-time using the HTTPService tag, into an ActionScript Object by simply setting the resultFormat property to “object”.
Full code after the jump.
Continue reading ‘Converting XML to objects using the Flex HTTPService MXML tag’
Just a quick example I threw together last night which loads the Kuler RSS feed and displays some items in a DataGrid along with their rating and theme image (using the Flex Image control as a custom item renderer).
Full code after the jump.
Continue reading ‘Parsing the Kuler RSS feed using Flex’
The following example demonstrates a very simple usage of sending parameters from Flex to a server-side script (written in ColdFusion) and then displaying the server response in our Flex application. The server-side script is a simple echo/”Hello world” type script, but it accepts URL or FORM variables, so you can send using the GET or POST HTTP-method.
It’s a pretty basic/crude example, but maybe it helps somebody out there.
Full code after the jump.
Continue reading ‘Using HTTPService tag to send/receive variables to a server-side script’
Semi-related to my previous post, I was playing around and figured out a way (probably not the best method) for loading a page of remote name/value pairs and putting them in a DataGrid using the HTTPService tag.
Full code after the jump
Continue reading ‘Loading name/value pairs using the mx:HTTPService tag’
In the previous post we looked at how to load an XML document in at compile-time and have it embedded in our Flex application. But that technique really only works if the XML data in question never changes. What if you had an XML document that was constantly changing on a daily, or hourly, basis. For example, consider an RSS reader application. If the XML was loaded and embedded in the XML document at compile-time, the RSS would never get updated. And while that may be good in some cases (such as a kiosk, or somewhere without an internet connection where you wanted to display static information), in many cases it may not work.
So, lets take a look at using the mx:HTTPService tag to dynamically load an XML file.
Continue reading ‘Loading XML at run-time using the mx:HTTPService tag’