MACROMEDIA FLEX-GETTING STARTED WITH FLEX Uživatelský manuál Strana 93

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 148
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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
Zobrazit stránku 92
1 2 ... 88 89 90 91 92 93 94 95 96 97 98 ... 147 148

Komentáře k této Příručce

Žádné komentáře