DEVELOPING COLDFUSION 9 APPLICATIONS
Flex and AIR Integration in ColdFusion
cfServer="{cred.cfip.text}"
cfPort="{int(cred.cfprt.text)}"
cfContextRoot="{cred.cfcnxtrt.text}"
servicePassword="{cred.cfservicepassword.text}"
serviceUserName="{cred.cfserviceusername.text}"
/>
<cf:Mail id="mailtest"
server="xx.xxx.xx.xxx"
to="{too.text}" bcc="{bcc.text}" cc="{cc.text}"
failTo="jayesh@adobe.com" replyTo="jayesh@adobe.com"
subject="{subject.text}" content="{mailbody.text}"
from="{from.text}"
attachments="{attachCollection}"
type="text" charset="utf-8" mailerId="CF" priority="1"
timeout="60" useTLS="true" wrapText="5"
result="handleResult(event)"
fault="handleError(event)"
/>
</mx:WindowedApplication>
Using the Image class
The Image class is the proxy for the ColdFusion Image service, which provides the functionality of the cfimage tag.
You specify the required cfimage attributes for the action as Image tag attributes. The following examples show typical
usage, in this case adding a border:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
xmlns:cf="coldfusion.service.mxml.*"
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import coldfusion.service.events.*;
function init():void
{
img.execute();
}
function handleResult(event:ColdFusionServiceResultEvent):void
{
mx.controls.Alert.show("result=" + event.result.toString());
retImage.source = event.result.toString();
}
function handleError(event:ColdFusionServiceFaultEvent):void
{
mx.controls.Alert.show(event.toString());
}
]]>
</mx:Script>
creationComplete="init()">
Last updated 1/20/2012
662