9 562 brands
2 694 000 user's guides


Download your manual, it's FREE! Diplodocs allows you to download several types of document in order to best use your MACROMEDIA FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE : user manual, user guide, instruction manual.
Search a brand
Advanced Search

User manual MACROMEDIA FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE

Diplodocs help download the user guide MACROMEDIA FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE .

Download the complete user guide (1607 Ko)





Preview of the first 3 pages of manual

You either have JavaScript turned off or an old version of Adobe Flash Player
Get the latest Flash Player.
Manual abstract: user guide MACROMEDIA FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE

Detailed instructions for use are in the User's Guide.

Server-Side ActionScript Language Reference Trademarks 1 Step RoboPDF, ActiveEdit, ActiveTest, Authorware, Blue Sky Software, Blue Sky, Breeze, Breezo, Captivate, Central, ColdFusion, Contribute, Database Explorer, Director, Dreamweaver, Fireworks, Flash, FlashCast, FlashHelp, Flash Lite, FlashPaper, Flash Video Encoder, Flex, Flex Builder, Fontographer, FreeHand, Generator, HomeSite, JRun, MacRecorder, Macromedia, MXML, RoboEngine, RoboHelp, RoboInfo, RoboPDF, Roundtrip, Roundtrip HTML, Shockwave, SoundEdit, Studio MX, UltraDev, and WebHelp are either registered trademarks or trademarks of Macromedia, Inc. and may be registered in the United States or in other jurisdictions including internationally. Other product names, logos, designs, titles, words, or phrases mentioned within this publication may be trademarks, service marks, or trade names of Macromedia, Inc. or other entities and may be registered in certain jurisdictions including internationally. Third-Party Information This guide contains links to third-party websites that are not under the control of Macromedia, and Macromedia is not responsible for the content on any linked site. If you access a third-party website mentioned in this guide, then you do so at your own risk. Macromedia provides these links only as a convenience, and the inclusion of the link does not imply that Macromedia endorses or accepts any responsibility for the content on those third-party sites. SorensonTM SparkTM video compression and decompression technology licensed from Sorenson Media, Inc. Copyright © 2005 Macromedia, Inc. All rights reserved. This manual may not be copied, photocopied, reproduced, translated, or converted to any electronic or machine-readable form in whole or in part without written approval from Macromedia, Inc. Notwithstanding the foregoing, the owner or authorized user of a valid copy of the software with which this manual was provided may print out one copy of this manual from an electronic version of this manual for the sole purpose of such owner or authorized user learning to use such software, provided that no part of this manual may be printed out, reproduced, distributed, resold, or transmitted for any other purposes, including, without limitation, commercial purposes, such as selling copies of this documentation or providing paid-for support services. Acknowledgments Project Management: Suzanne Smith Writing: Jody Bleyle Editing: Geta Carlson, Mary Ferguson, Mary Kraemer Production and Editing Management: Patrice O'Neill, Rosana Francescato Media Design and Production: Adam Barnett, Aaron Begley, Paul Benkman, John Francis, Mario Reynoso Special thanks to Erick Vera and the Flash Media Server engineering and QA teams. First Edition: October 2005 Macromedia, Inc. 601 Townsend St. San Francisco, CA 94103 Contents Chapter 1: Server-Side ActionScript Language Reference . . . . . . 5 Using server-side ActionScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Using naming conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 ActionScript classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Global functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 ActionScript elements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Application class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 clearInterval(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Client class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47 File class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 getGlobal() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 load() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .87 LoadVars class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .87 Log class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 NetConnection class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .102 protectObject() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 setAttributes() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 setInterval() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 SharedObject class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 SOAPCall class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140 SOAPFault class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .142 Stream class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .144 trace() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 WebService class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .162 XML class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .166 XMLSocket class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .218 XMLStreams class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 Appendix A: Server-Side Information Objects . . . . . . . . . . . . . 229 Application information objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 NetConnection information objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . .231 Stream information objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 3 4 Contents CHAPTER 1 Server-Side ActionScript Language Reference Server-side ActionScript is a scripting language on the server that lets you develop efficient and flexible client-server Macromedia Flash Media Server applications. For example, you can use server-side ActionScript to control log-in procedures, control events in connected Macromedia Flash applications, determine what users see in their Flash applications, and communicate with other servers. You can also use server-side scripting to allow and disallow users access to various server-side application resources and to allow users to update and share information. Server-side ActionScript is based on the ECMA-262 specification (ECMAScript 1.5), which is derived from JavaScript and lets you access the core JavaScript server object model. Serverside ActionScript provides global methods and classes and exposes a rich object model for developing media applications. You can also create classes, properties, and methods. This dictionary provides detailed information about the classes and their properties, methods, and events. Client-side ActionScript is based on the ECMA-262 specification but deviates from the specification in several places. Server-side ActionScript does not deviate from the ECMA-262 specification. For information about the relationship between server-side ActionScript and client-side ActionScript, see Developing Media Applications. 1 Using server-side ActionScript To use server-side ActionScript with a Flash Media Server application, you write the code, add the script file to the appropriate server directory, and run the SWF file that connects to the server. To understand the architecture of Flash Media Server and its applications, see Developing Media Applications. 5 Create the server-side ActionScript file and name it main.asc. All ActionScript code that is embedded in the script file and not in a function body executes once when the application is loaded but before the application.onAppStart event handler is called. You can name your server-side ActionScript file app_name, where app_name is the name of your application's directory, and save it with a file extension of .asc or .js. Also, any double-byte characters (including characters of all Asian languages) in the serverside ActionScript file must be UTF-8-encoded. For more information on server-side script files, see Developing Media Applications. For large-scale applications, you may need to use multiple server-side script files. You can use the Flash Media Server archive compiler utility to deploy those files as a package from a single location. For more information, see "Archiving and compiling server-side script files" in Developing Media Applications. Server-side scripts also have a secure loading phase, during which critical code can be loaded before the main application loading phase. Server-side scripts also let you create protected objects; these are objects whose methods and data cannot be inspected or manipulated. These two features allow you to implement system calls that protect critical data and functions. For more information, see "Implementing secure system objects" in NO TE To install and test the server-side ActionScript file: 1. 2. 3. 6 NO TE N OT E Developing Media Applications. Locate the Macromedia Flash Media Server /applications directory. The default location of the /applications directory is in the Macromedia Flash Media Server product installation directory. If you did not accept the default installation settings and you aren't sure where the /application directory is located, the location is specified in the AppsDir tag of the Vhost.xml file, which is located at /Flash Media Server /conf/defaultRoot/ defaultVhost. For information about configuring a different application directory, see Managing Flash Media Server. Although your SWF and HTML files should be published under a web server directory, your server-side ASC files, your audio/video FLV files, and your ActionScript FLA source files should not be accessible to a user browsing your website. N OT E Your server-side script file must be named main.asc, main.js, registered_app_name.asc, or registered_app_name.js. Create a subdirectory in the /applications directory called appName, where appName is a name you choose as the filename of your Flash Media Server application. You must pass this name as a parameter to the NetConnection.connect() method in the client-side ActionScript. Server-Side ActionScript Language Reference 4. 5. Place the main.asc file in the appName directory or in a subdirectory called scripts in the appName directory. Open the Flash application (the SWF file) in a browser or in the stand-alone Flash Player. The SWF file must contain ActionScript code that passes appName to the connect method of the NetConnection class, as shown in the following example: nc = new NetConnection(); nc.connect("rtmp://flashcomsvr.mydomain.com/myFlashComAppName"); You can use the management console to check if the application loaded successfully. NO T E Using naming conventions When you write server-side ActionScript code, there are certain naming conventions that you must use to name your applications, methods, properties, and variables. These rules let you logically identify objects so your code executes properly. Naming applications Flash Media Server application names must follow the Uniform Resource Identifier (URI) RFC 2396 convention. This convention supports a hierarchical naming system where a forward slash (/) separates the elements in the hierarchy. The first element specifies the application name. The element following the application name specifies the application instance name. Each instance of the application has its own script environment. Specifying instances By specifying a unique application instance name after an application name, you can run multiple instances of a single application. For example, rtmp:/support/session215 specifies a customer support application named "support" and refers to a specific session of that application named "session215". All users who connect to the same instance name can communicate with each other by referencing the same streams or shared objects. Using JavaScript syntax You must follow all syntax rules of JavaScript. For example, JavaScript is case-sensitive and does not allow punctuation other than underscores (_) and dollar signs ($) in names. You can use numbers in names, but names cannot begin with a number. Using naming conventions 7 Avoiding reserved commands Flash Media Server has reserved commands that you cannot use in a script. These commands are either methods that belong to the client-side NetConnection class or methods that belong to the server-side Client class. This m ...

  Know our Partners   Frequently Asked Questions   Contact Diplodocs team   Last searches
Latest additions
  Sitemap
Brands starting with A B C D E F G H I J K L M N O P Q R S T U V W X Y Z #
Copyright © 2005 - 2008 - Diplodocs - All Rights Reserved.
Designated trademarks and brands are the property of their respective owners.