MACROMEDIA FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY Dokumentacja Strona 164

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 369
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 163
Chapter 586
You’ll place the FLA and ASC files in your application directory, and place in that same directory
the netservices.asc file that enables NetServices. You’ll place the CFC or CFM file in the default
directory where you deploy your other ColdFusion script files.
Finally, you’ll test your movie by publishing the SWF file and running it. Make sure the Flash
Communication Server and the ColdFusion MX server are running before you attempt to test
your sample.
Sample 1: Simple Remoting
In this sample, the client application requests some calculations to be done on the application
server and the results to be returned in the string format. The client invokes calls to the Flash
Communication Server. The Flash Communication Server, in turn, acts as a client of the Flash
Remoting service—here, a CFC script—to request that the work be done by the back-end server
and the results returned.
About the sample
When the user clicks the Run Test button, the screen is updated with a message from the server, a
Boolean value, an array of months, and the result of an addition operation.
Re-creating the sample
The doc_remoting.fla file provides the user interface for testing connectivity between the client,
the Flash Communication Server, and the ColdFusion MX server. The main.asc file accepts the
connection from the client, and in turn, connects to ColdFusion using Flash Remoting. The
simple.cfc file contains the scripts for getting a Boolean value, an array, and a sum.
See “Creating your working environment” on page 31 before you start to re-create the sample.
To create the user interface for this sample:
1 From the toolbox, select the Text tool and draw a dynamic text box. In the Property inspector
(Window > Properties), select Dynamic Text for the type of text box, and give it the instance
name
ResultBox.
2 To add the button for running the tests, open the Components panel (Window >
Components) and drag a push button onto the Stage. In the Property inspector, give it the
instance name
Run_btn, the label Run Tests, and the click handler runTests.
3 Create a directory named doc_remoting in your flashcom application directory, and save the
file as doc_remoting.fla in this directory.
To write the client-side ActionScript for this sample:
1 Add the following debug code to trace all the status information coming back from the Flash
Communication Server.
// Trace all the status information.
function traceStatus(info) {
trace("Level: " + info.level + " Code: " + info.code);
}
// Create onStatus prototypes for the objects that
// will return status.
NetConnection.prototype.onStatus = traceStatus;
NetStream.prototype.onStatus = traceStatus;
SharedObject.prototype.onStatus = traceStatus;
Przeglądanie stron 163
1 2 ... 159 160 161 162 163 164 165 166 167 168 169 ... 368 369

Komentarze do niniejszej Instrukcji

Brak uwag

Epson V11H582041 manuels

Manuels d'utilisation et guides de l'utilisateur pour Projecteurs de données Epson V11H582041.
Nous fournissons des manuels en pdf 1 Epson V11H582041 à télécharger gratuitement par type de document : Fiche technique






Plus de produits et de manuels pour Projecteurs de données Epson

Modèles Type de document
EMP 8100NL Manuel de l'utilisateur   Epson EMP 8100NL User's Manual, 117 pages
Z9870NL Spécifications   Epson Z9870NL Product Specifications, 2 pages
450Wi Brochure   Epson 450Wi Product Brochure, 18 pages
EMP-7300 Manuel de l'utilisateur   Epson EMP-7300 User's Manual, 121 pages
V11H570040 Fiche technique   Epson EB-X20, 2 pages
DREAMIO EMP-TW700 Manuel de l'utilisateur   Epson DREAMIO EMP-TW700 User's Manual, 3 pages
V11H543041 Fiche technique   Epson EB-4850WU, 2 pages
V11H581041 Fiche technique   Epson EB-945, 2 pages
V11H622041 Fiche technique   Epson EB-1970W, 2 pages
V11H555141 Fiche technique   Epson EB-X03, 2 pages
V11H563041 Fiche technique   Epson EB-4950WU, 2 pages
V11H570041 Fiche technique   Epson EB-X20, 2 pages
V11H550120 Fiche technique   Epson PowerLite 1262W, 4 pages
V11H540040 Fiche technique   Epson EB-421i, 2 pages
V11H615040 Fiche technique   Epson EB-Z9800W, 2 pages
V11H556141 Fiche technique   Epson EB-S03, 2 pages
V11H536040 Fiche technique   Epson EB-436Wi, 6 pages
V11H554141 Fiche technique   Epson EB-W03, 2 pages
V11H552041 Fiche technique   Epson EB-S18, 2 pages
V11H568041 Fiche technique   Epson EB-S17, 2 pages