PHPBuilder - PHP and Adobe Flex Page 2 Page 2



RSS Twitter
Articles

PHP and Adobe Flex Page 2 - Page 2

by: Daniel Williams
|
September 26, 2008

Let's modify our MXML script to populate the chart (see Example 3.3).
Example 3.3
import mx.collections.ArrayCollection;
        	
	 [Bindable]
	private var popChart:ArrayCollection = new ArrayCollection([]);

	public function showResults(evt:ResultEvent) : void
	{
		var retResult:Object = evt.result;
		var resData:String = '';
				
		currentState='resultsPage';
            	
		for( var i:Number=0; i < retResult.RESULTS.STATE.length; i++ )
		{
			resData += retResult.RESULTS.STATE[i]+
				' ('+retResult.RESULTS.STATE[i].ABV+') -'+ 							retResult.RESULTS.STATE[i].POP+'\n';
		}
	            
		resText.text = resData;
            	
		for( i=0; i < retResult.RESULTS.STATE.length; i++ )
		{
			popChart.addItem({State: retResult.RESULTS.STATE[i].ABV,
				 Pop: retResult.RESULTS.STATE[i].POP});
		}
	}
Final Thoughts
This article addressed fundamental concepts to demonstrate how Adobe Flex relates to PHP. However, there should be further consideration regarding security, such as SQL injection code, but that is out of the scope of this article.
Because Adobe Flex is still relatively young, further advances from Zend and Adobe may enhance this relationship. For example, Mike Potter at Adobe is currently developing an Adobe PHP SDK. Look for great things to come!!



« Previous Page
1

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Daniel Williams

Comment:



Comment:

(Maximum characters: 1200). You have characters left.