I needed to setup a system where the same data could be viewed/accessed in both a swf file and an HTML file on the web.
I set up the swf file to dynamically load an xml file. The nodes and attributes of the xml would then be parsed and stored in an instance of a class which I named CheatsheetData class(currently known as pocket notes now). Continue reading
Now that I have
The flex application can now request the actual service using the channel setting defined in the initialization function in step 2 above. Continue Reading
By using FlashVars and a SiteConfigurationModel class, a Flex application can be setup to dynamically define the server configurations needed to communicate with a php backend at runtime. This allows us to eliminate the need for hardcoding the -services compiler argument value and using a services-config.xml file at compile time.
As a result of being able to read and use server communication based settings at runtime instead of compile time, Flex applications can be easily moved to other websites without the requirement/need of recompilation. Continue Reading
Recommendation – use SWFObject to pass flashVars into a flex swf file application since it simplifies the whole process. The passing of data is centralized and taken care of for you in an OOP programmatic fashion.
My intent was to pass server data into a flex based application so that it could be configured dynamically on the fly. I did not want to hardcode these values into the application in case I moved the web application to anther URL. I wanted to pass the server path and the php context root values as flashVars.
The first step was to generate a php file that would pass this information into the flex application. I started by grabbing the html code generated by the flex compiler. Continue Reading
The Adobe Flex Appllication background color setting defaults to a light grey(#869ca7). I wanted it to be white.
I initially tried to set the background color in the application tag in the mxml file which did not work.
<mx:application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:views="views.*" xmlns:components="com.pfp.components.*" backgroundGradientColors="[#ffffff,#ffffff]" backgroundColor="#ffffff" initialize="onInitialize()" layout="absolute">
I then looked in the html file which was generated in the bin-debug directory and I found the generated default background color value(#869ca7). Continue Reading