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’
The following example shows how you can create multi-line rows with wrapping text and variable row heights with the Flex List control.
Full code after the jump.
Continue reading ‘Creating multi-line list rows with variable row heights’
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’
In a previous post, “Dynamically creating ActionScript cue points from FlashVars received from the HTML container”, we looked at how to create ActionScript cue points based on variables passed in to our Flex application from the HTML template’s “FlashVars” parameter. In this post we look at a similar approach, although using the <mx:HTTPService /> tag to load cue points from an external file of name/value pairs. This example could easily be extended further to pass a variable to a server-side script which would grab cue point information from a database and pass it back into Flex either as a string of name/value pairs, or as an XML document.
Full code after the jump.
Continue reading ‘Dynamically creating ActionScript cue points from FlashVars loaded using the HTTPService tag’
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’