MACROMEDIA FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY Bedienungsanleitung

Stöbern Sie online oder laden Sie Bedienungsanleitung nach Server MACROMEDIA FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY herunter. Server-Side Communication ActionScript Dictionary Macromedia Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 80
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 0
Server-Side Communication
ActionScript Dictionary
Macromedia Flash
Communication Server MX 1.5
Seitenansicht 0
1 2 3 4 5 6 ... 79 80

Inhaltsverzeichnis

Seite 1 - ActionScript Dictionary

Server-Side CommunicationActionScript DictionaryMacromedia Flash™ Communication Server MX 1.5

Seite 2

10Method summary for the Application objectProperty summary for the Application object Event handler summary for the Application objectApplication.acc

Seite 3 - CONTENTS

Server-Side Communication ActionScript 11ParametersclientObj A client to accept. ReturnsNothing.DescriptionMethod; accepts the connection call from a

Seite 4 - APPENDIX

12DescriptionMethod; removes persistent shared objects (FSO files) specified by the soPath parameter and clears all properties from active shared obje

Seite 5

Server-Side Communication ActionScript 13DescriptionMethod; clears recorded streams (FLV) files and MP3 files associated with the application instance

Seite 6 - Using naming conventions

14The following example clears all MP3 files from the application instance’s /disco subdirectory:function onApplicationStop(){application.clearStreams

Seite 7 - Contents of the dictionary

Server-Side Communication ActionScript 15DescriptionMethod; causes the server to terminate a client connection to the application. When this method is

Seite 8

16DescriptionProperty (read-only); contains the hostname of the server for default virtual hosts and the virtual hostname for non-default virtual host

Seite 9 - Application (object)

Server-Side Communication ActionScript 17ExampleThe following example defines an anonymous function for the application.onAppStart event handler that

Seite 10 - Application.acceptConnection

18Application.onConnectAvailabilityFlash Communication Server MX.Usageapplication.onConnect = function (clientObj [, p1, ..., pN]){// insert code here

Seite 11

Server-Side Communication ActionScript 19Note: Returning 1 or 0 is not the same as returning true or false. The values 1 and 0 are treated the same as

Seite 12 - Application.clearStreams

TrademarksAfterburner, AppletAce, Attain, Attain Enterprise Learning System, Attain Essentials, Attain Objects for Dreamweaver, Authorware, Authorware

Seite 13 - Examples

20ExampleThis example verifies that the user has sent the password “XXXX”. If the password is sent, the user’s access rights are modified and the user

Seite 14 - Application.disconnect

Server-Side Communication ActionScript 21Application.onConnectAcceptAvailabilityFlash Communication Server MX (with communication components only)Usag

Seite 15 - Application.getStats

22The second example is server-side code you would include in your application’s main.asc file://When using components, always load components.ascload

Seite 16 - Application.onAppStart

Server-Side Communication ActionScript 23When you use components, the last line (in order of execution) of the onConnect method should be either appli

Seite 17 - Application.onAppStop

24ParametersclientObj A client disconnecting from the application.ReturnsThe server ignores any return value.DescriptionEvent handler; invoked when a

Seite 18 - Application.onConnect

Server-Side Communication ActionScript 25Application.registerClassAvailabilityFlash Communication Server MX.Usageapplication.registerClass(className,

Seite 19

26ExampleThis example defines a Color constructor function with properties and methods. After the application connects, the registerClass method is ca

Seite 20 - See also

Server-Side Communication ActionScript 27proxyConnection A Client or NetConnection object. All requests to execute the remote method specified by meth

Seite 21 - Application.onConnectAccept

28DescriptionMethod; rejects the connection call from a client to the server. The application.onConnect event handler notifies a script when a new cli

Seite 22 - Application.onConnectReject

Server-Side Communication ActionScript 29ExampleThe following example checks the server property against a string before executing the code inside the

Seite 23 - Application.onDisconnect

3CONTENTSServer-Side Communication ActionScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5Using server-side ActionScript. . . . . . .

Seite 24 - Application.onStatus

30When you call NetConnection.call from a client-side ActionScript script, the method that executes in the server-side script must be a method of the

Seite 25 - Application.registerClass

Server-Side Communication ActionScript 31The above example works, but must be executed every time a client connects. If you want the same methods and

Seite 26 - Application.registerProxy

32Method summary for the Client object Property summary for the Client object Event handler summary for the Client object Client.agentAvailabilityFlas

Seite 27 - Application.rejectConnection

Server-Side Communication ActionScript 33ExampleThe following example checks the agent property against the string "WIN" and executes differ

Seite 28 - Application.server

34The following server-side script uses the Client.call method inside the application.onConnect handler to call the random method that was defined on

Seite 29 - Client (object)

Server-Side Communication ActionScript 35The sum method can then be called from NetConnection.call on the Flash client side, as shown in the following

Seite 30

36ReturnsAn integer indicating bytes per second.DescriptionMethod; returns the maximum bandwidth that the client or the server can use for this connec

Seite 31

Server-Side Communication ActionScript 37Client.ipAvailabilityFlash Communication Server MX.UsageClient.ipDescriptionProperty (read-only); contains th

Seite 32 - Client.agent

38Client.pingAvailabilityFlash Communication Server MX.UsageClient.pingDescriptionMethod; sends a "ping" message to the client and waits for

Seite 33 - Client.call

Server-Side Communication ActionScript 39Clients with read access to a directory that contains streams can play streams in the specified access levels

Seite 34

Contents4Client.writeAccess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41load. . . . .

Seite 35 - Client.getBandwidthLimit

40ReturnsThe value of the undefined property, which is specified by the propName parameter.DescriptionMethod; provides values for undefined properties

Seite 36 - Client.getStats

Server-Side Communication ActionScript 41Client.writeAccessAvailabilityFlash Communication Server MX.UsageClient.writeAccessDescriptionProperty; provi

Seite 37 - Client.protocol

42DescriptionMethod (global); loads an ActionScript file inside the main.asc file. This method executes only when the ActionScript file is first loade

Seite 38 - Client.readAccess

Server-Side Communication ActionScript 43Method summary for the NetConnection object Property summary for the NetConnection object Event handler summa

Seite 39 - Client.__resolve

44Parameters name A string that identifies the header and the ActionScript object data associated with it.mustUnderstand A Boolean value; true indicat

Seite 40 - Client.setBandwidthLimit

Server-Side Communication ActionScript 45DescriptionMethod; invokes a command or method on a Flash Communication Server or an application server to wh

Seite 41 - Client.writeAccess

46ExampleThe following code closes the NetConnection instance myNetConn:myNetConn.close();NetConnection.connectAvailabilityFlash Communication Server

Seite 42 - NetConnection (object)

Server-Side Communication ActionScript 47NetConnection.isConnectedAvailabilityFlash Communication Server MX.UsagemyNetConnection.isConnectedDescriptio

Seite 43 - NetConnection.addHeader

48ExampleThis example defines a function for the onStatus handler that outputs messages to indicate whether the NetConnection was successful:nc = new

Seite 44 - NetConnection.call

Server-Side Communication ActionScript 49DescriptionMethod (global); continually calls a function or method at a specified time interval until the cle

Seite 45 - NetConnection.close

Server-Side Communication ActionScript 5Server-Side Communication ActionScriptServer-Side Communication ActionScript is a scripting language on the se

Seite 46 - NetConnection.connect

50Every shared object is identified by a unique name and contains a list of name-value pairs, called properties, just like any other ActionScript obje

Seite 47 - NetConnection.onStatus

Server-Side Communication ActionScript 51Method summary for the SharedObject object Property summary for the SharedObject object Event summary for the

Seite 48 - NetConnection.uri

52ParametersNone.ReturnsReturns true if successful; false otherwise. DescriptionMethod; deletes all properties and sends a “clear” event to all client

Seite 49 - • Sharing data in real time

Server-Side Communication ActionScript 53SharedObject.flushAvailabilityFlash Communication Server MX.UsageSharedObject.flush()ParametersNone.ReturnsA

Seite 50

54DescriptionStatic method; returns a reference to a shared object instance. To perform any operation on a shared object, the server-side script must

Seite 51 - SharedObject.clear

Server-Side Communication ActionScript 55ExampleThis example creates a shared object named foo inside the function onProcessCmd. The function is passe

Seite 52 - SharedObject.close

56SharedObject.getPropertyNamesAvailabilityFlash Communication Server MX.UsagemySharedObject.getPropertyNames()Parameters None.ReturnsAn array contain

Seite 53 - SharedObject.get

Server-Side Communication ActionScript 57The this keyword used in the body of the function is set to the shared object instance returned by SharedObje

Seite 54

58ExampleThis example outputs foo to the NetConnection Debugger:mySO = SharedObject.get("foo");trace(mySO.name);SharedObject.onStatusAvailab

Seite 55 - SharedObject.getProperty

Server-Side Communication ActionScript 59Local shared objectsNote: Changing or deleting a property on the server side using the SharedObject.setProper

Seite 56 - SharedObject.handlerName

6To install and test the server-side ActionScript file, do the following: 1 Locate the Macromedia Flash Communication Server /applications directory.T

Seite 57 - SharedObject.name

60ExampleThe following example creates a function that is invoked whenever a property of the shared object so changes:// create a new NetConnection ob

Seite 58 - SharedObject.onSync

Server-Side Communication ActionScript 61ExampleThis example deletes all properties of the myShared shared object that are older than the value of Sha

Seite 59

62ParametersmethodName The name of a method on a client shared object instance. For example, if you specify doSomething, the client must invoke the Sh

Seite 60 - SharedObject.purge

Server-Side Communication ActionScript 63DescriptionMethod; updates the value of a property in a shared object. A shared object property can be modifi

Seite 61 - SharedObject.send

64ExampleThis example gets the number of properties of a shared object and assigns that number to the variable len: var myShared = SharedObjecd.get(ap

Seite 62 - SharedObject.setProperty

Server-Side Communication ActionScript 65Stream (object)The Stream object lets you handle each stream in a Flash Communication Server application. A s

Seite 63 - SharedObject.size

66Stream.bufferTimeAvailabilityFlash Communication Server MX.UsageStream.bufferTimeDescriptionProperty (read-only); indicates how long to buffer messa

Seite 64 - SharedObject.version

Server-Side Communication ActionScript 67Note: The Stream information object is nearly identical to the client-side ActionScript NetStream information

Seite 65 - Stream (object)

68ExampleThis example gets the length of the recorded stream file myVideo and assigns it to the variable streamLen:function onProcessCmd(cmd){var stre

Seite 66 - Stream.clear

Server-Side Communication ActionScript 69DescriptionEvent handler; invoked every time the status of a Stream object changes. For example, if you play

Seite 67 - Stream.length

Server-Side Communication ActionScript 7Using JavaScript syntaxYou must follow all syntax rules of JavaScript. For example, JavaScript is case-sensiti

Seite 68 - Stream.onStatus

70You can also specify a number value of 2 or 3 for the reset parameter, which is useful when playing recorded stream files that contain message data.

Seite 69 - Stream.play

Server-Side Communication ActionScript 71If the flag is set to true, some compression is invoked on the server. Using the previous example, if the fla

Seite 70

72The following example creates a playlist of three MP3 files (beethoven.mp3, mozart.mp3, and chopin.mp3) and plays each file in turn over the live st

Seite 71

Server-Side Communication ActionScript 73ExampleThis example opens a stream s and, when it is open, plays sample and records it. Because no value is p

Seite 72 - Stream.record

74The following example is the client-side ActionScript that receives the Stream.send call. The method Test is defined on the Stream object:tStream.Te

Seite 73 - Stream.send

Server-Side Communication ActionScript 75traceAvailabilityFlash Communication Server MX.Usagetrace("Hello world");trace("Value of i = &

Seite 75 - Availability

77APPENDIXServer-Side Information ObjectsThe Application, NetConnection, and Stream objects provide an onStatus event handler that uses an information

Seite 76

Appendix78NetConnection information objectsThe NetConnection object has the same information objects as the client-side NetConnection object. Applicat

Seite 77

Server-Side Information Objects 79Stream information objectsThe information objects of the Stream object are similar to those of the client-side NetSt

Seite 78 - Appendix78

8getBandwidthLimit Client.getBandwidthLimitgetProperty SharedObject.getPropertygetPropertyNames SharedObject.getPropertyNameshandlerName SharedObject.

Seite 80 - Appendix80

Server-Side Communication ActionScript 9Application (object)The Application object contains information about a Flash Communication Server application

Kommentare zu diesen Handbüchern

Keine Kommentare