MACROMEDIA FLEX-GETTING STARTED WITH FLEX Bedienungsanleitung Seite 93

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 148
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 92
<cffunction name="getShippingOptions_CFQuery" access=
"remote" returntype="query">
<cfargument name="zipcode" type="any" required="yes">
<cfargument name="pounds" type="any" required="yes">
<cfset var options=ArrayNew(1)>
<cfset var baseCost=(zipcode / 10000) + (pounds * 5)>
<cfscript>
qOptions = queryNew("service, price");
newRow = QueryAddRow(qOptions, 3);
temp = QuerySetCell(qOptions, "service",
"Next Day", 1);
temp = QuerySetCell(qOptions, "price",
baseCost * 4, 1);
temp = QuerySetCell(qOptions, "service",
"Two Day Air", 2);
temp = QuerySetCell(qOptions, "price",
baseCost * 2, 2);
temp = QuerySetCell(qOptions, "service",
"Saver Ground", 3);
temp = QuerySetCell(qOptions, "price",
baseCost, 3);
</cfscript>
<cfreturn qOptions>
</cffunction>
</cfcomponent>
Going on from Here
As you can see, Flex makes it easy to communicate with your
web server no matter what protocol it’s running. Protocols
such as SOAP and AMF are as easy to use as invoking a method
on an object. And the E4X syntax built into ActionScript 3
makes parsing XML directly a snap.
Going on from Here | 77
Seitenansicht 92
1 2 ... 88 89 90 91 92 93 94 95 96 97 98 ... 147 148

Kommentare zu diesen Handbüchern

Keine Kommentare