I am using HostMySite as my web host and have the Linux Builder Plus CF package.
I haven’t upgraded to CF8 since that would require me to change my host package to use Windows. I don’t think I want that, since I like having SSH access to the machine my site is physically on.
I had just finished with my blog regarding Moving data from ColdFusion CFCs to Flex 2 Applications Using Webservices and was trying to get my code working on my site for the follow up article on Moving data from ColdFusion CFCs to Flex 2 Applications Using RemoteObject.
I was not being very successful and had even spoken with HostMySite support and they told me that accessing cfcs from Flex as RemoteObjects through the Flex Gateway with Coldfusion was not enabled and furthermore could not be enabled for a shared hosting account. If I wanted that functionality, I would have to upgrade to a VPS (Virtual Private Server) host package.
Now I pay about $65 per quarter for my host account for CF and Wordpress capabilities. The base VPS host package with Coldfusion starts at $116 a month. I don’t know about you, but that is quite a jump for me, so I decided to do a bit more digging around. As it turned out, I found a few forum entries that seemed to allude that it was possible. In fact, one person had even posted to a link in his hosted site where he actually had my dev center article remote object sample working! Unfortunately he didn’t quite say how he had accomplished such a feat.
Well I knew how I would deal with that mystery. I got out my trusty Web Debugging Proxy tool: Charles to sniff the request that the sample was making so I could see what the url was to the flex gateway. As it turns out, I was just missing a trailing slash on my flex2gateway URI!!!!!
The key to getting this to work revolves around 3 things:
1. Getting your config files located and configured properly for compilation.
2. Getting the fully qualified name for your cfc correct.
3. Knowing the endpoint URI for your Flex Gateway fro your Coldfusion server.
In Flex Builder in my project, I create the following 2 config files:
September 24th, 2007 by Kyle
Posted in: Flex, Coldfusion
One of my first blog posts pointed to a dev center article that I wrote on this topic for the Flex 2 release. I often send customers to look at this article when appropriate as it is a good starting point for webservice and remoteobject communication between Flex and Coldfusion. I also find myself referring to this sample once in a while and so I have finally decided to host the sample and cfc from my website/blog and potentially enhance the cfc to support more use cases for subsequent blog posts.
Here is a simple little demo that shows how to create, style and position a tooltip so it looks like an Error bubble.
This way you can have more than one visible Error Tip visible at once.
publicclass MyLineRenderer extends LineRenderer { privatestaticvar rcFill:Rectangle = new Rectangle();
publicfunction MyLineRenderer() { super(); }
override protected function updateDisplayList(unscaledWidth:Number,
unscaledHeight:Number):void { var l:int=(data as LineSeriesSegment).items.length; if(l==1){ var item:LineSeriesItem=((data as LineSeriesSegment).items[0] as LineSeriesItem) var fill:IFill = GraphicsUtilities.fillFromStyle(getStyle("fill")); var stroke:IStroke = getStyle("stroke");
I had a customer ask how they could use a button itemRenderer in a tile list, have the buttons toggle, and keep track of all the toggled buttons so one could easily clear all the toggled buttons. Here is what I came up with:
The key to this is that if your TileList has a dataprovider that is an array collection, within an itemRenderer, each item’s BaseListData will have a UUID.
If you extend the Tilelist and add a public member that is an arrayCollection that is used to contain all the UUIDs of toggled buttons, then management of those toggled buttons become quite easy.
Here is my simple extension to TileList:
<?xmlversion="1.0" encoding="utf-8"?>
<mx:TileList xmlns:mx="http://www.adobe.com/2006/mxml"
initialize="acToggledButtons = new ArrayCollection()">
September 6th, 2007 by Kyle
Posted in: Flex Charting
I worked on this sample with a customer to help debug some issues. I must confess, I don’t remember what I did and haven’t review the code to recall how this works, but it is a nice little sample. When you mouse over an item in the legend, the series in the chart glows and vice versa, when you mouse over an item in the chart, the corresponding item in the legend glows. Neato!
September 3rd, 2007 by Kyle
Posted in: Flex Charting
I had a customer asking how he could make the lines in a LineSeries have a sensitivity to mouse proximity similar to the datapoints.
Here is what I came up with:
The essence of the solution was to extend the LineRenderer and draw an additional line with alpha=0, but of specified width, to the graphics object that the visible line is drawn on. That way mouse events will be dispatched by this line.
I figured the most logical place to specify the lineSensitivity attribute would be on the “Stroke” object, so I added that property to an extension of the Stroke class that I then access in my custom LineRenderer.
Recent Comments