
Programming Flash Communication Server
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
More details
Other editions
Additional editions

Content
- Intro
- Table of Contents
- Foreword
- Preface
- What Does FlashCom Offer?
- What's in This Book?
- How to Use This Book
- Part I: FlashCom Foundation
- Part II: Audio, Video, and Data Streams
- Part III: Remote Connectivity and Communication
- Part IV: Design and Deployment
- Audience
- ActionScript 1.0 Versus ActionScript 2.0
- Server-Side ActionScript
- The flash-communications.net Site
- Director, Breeze, and Other Options
- Flash Video Options
- Embedded Video
- Progressive Download
- Streaming Video with FlashCom
- Licensing and Hosting Options
- Conventions Used in This Book
- Voice
- Using Code Examples
- Getting the Code Examples Working
- Safari Enabled
- Comments and Questions
- Acknowledgments
- Part I
- Introducing the Flash Communication Server
- Clients and Servers
- Creating an Application
- Real-Time Messaging Protocol
- FlashCom Versus Traditional Media Servers
- The Communication Classes
- Connecting to the Server
- Streaming Audio, Video, and ActionScript Data
- Camera, Microphone, and Video
- Sharing Data in Real Time
- Client and Application Objects
- Remote Methods
- Communicating with Application Servers, Databases, and Directory Servers
- Firewalls and Security
- Getting Started
- Admin Service, Administration Console, and App Inspector
- Hello Video!
- Setting Up helloVideo on the Server
- Building the helloVideo Client in Flash
- Building the user interface
- Setting up the NetConnection and showing its status
- Making the connection
- Showing remote users
- Hello Video! Summary
- Conclusion
- Communication Components
- Overview of Communication Components
- Server-Side Requirements
- Common Methods of the Communication Components
- init( )
- connect( )
- close( )
- onUnload( )
- setUsername( )
- Summary of Communication Components
- AudioConference
- Nested Flash UI components
- Component process overview
- AVPresence
- Client-side component parameters
- Component process overview
- Chat
- Nested Flash UI components
- Component process overview
- Configurable server-side attributes
- ConnectionLight
- Client-side component parameters
- How the component works
- Enabling ConnectionLight without SimpleConnect
- Cursor
- How the component works
- PeopleList
- Nested Flash UI components
- Component process overview
- PresentationSWF
- Nested Flash UI components
- Client-side component parameters
- Component process overview
- PresentationText
- Nested Flash UI Components
- Client-side component parameters
- How the component works
- RoomList
- Nested Flash UI components
- Client-side component parameters
- Component process overview
- SetBandwidth
- Nested Flash UI components
- Client-side component parameters
- Component process overview
- SimpleConnect
- Nested Flash UI components
- Client-side component parameters
- How the component works
- UserColor
- Nested Flash UI components
- How the component works
- VideoConference
- Nested Flash UI components
- Client-side component parameters
- Component process overview
- VideoPlayback
- Nested Flash UI components
- Client-side component parameters
- Component process overview
- VideoRecord
- Nested Flash UI components
- Client-side component parameters
- Component process overview
- Whiteboard
- Nested Flash UI components
- How the component works
- Creating an Application that Monitors a Connection
- Making the FlashCom Application Folder
- Building the Flash Client Movie
- Building a Simple Chat Room
- Adding Audio and Video to the Chat Room
- Forgoing the SimpleConnect Component
- Building the Client Movie
- Conclusion
- Managing Connections
- Making a Connection
- Absolute URIs
- Protocol
- Host and port
- Application name
- Instance name
- Relative URIs
- Waiting to Connect
- Managing a Connection
- Dealing with Success
- Dealing with Problems
- Closing the Connection from the Client
- Using a Connection
- Reusing a NetConnection Object
- Multiple Simultaneous NetConnection Objects
- Testing and Debugging Network Connections
- Test Client Movies
- Using the NetConnection Debugger
- Subclassing the NetConnection Class
- Communication Components Without SimpleConnect
- Creating the Application on the Server
- Building the Client
- Conclusion
- Applications, Instances, and Server-Side ActionScript
- Scripting Application Instances
- Instances and Resources
- Resource Name Collisions
- Differences Between Flash ActionScript and Server-Side ActionScript
- Case-Sensitivity
- Working with Inheritance
- Single Execution Context
- Accessing Undefined Variables
- try/catch/finally Statements
- #include and import Versus load( )
- The Life of an Application Instance
- Startup
- Midlife
- Shutdown
- Running a Simple Hello World Test Script
- application.onAppStart( )
- application.onStatus( )
- application.onConnect( )
- application.onDisconnect( )
- application.onAppStop( )
- Using the App Inspector to Run Scripts
- A More Realistic Example
- Authenticating and Customizing Clients
- Using the Client.prototype object
- Limiting the Number of Client Connections
- Performing Periodic Updates with setInterval( )
- Instance-to-Instance Communications
- Script Filenames and Locations in Detail
- The main Application Script File
- Using load( ) to Include Other Script Files
- Dynamically loading script files
- Testing and Debugging Server-Side Script Files
- Organizing Test Scripts
- Designing Communication Applications
- Conclusion
- Part II
- Managing Streams
- A Simple Publisher/Subscriber Example
- Publishing a Live Stream
- Subscribing to a Live Stream
- Stream Names
- Publishing Streams in Detail
- onStatus( ) handlers
- Attaching and Detaching Audio and Video Sources
- Bandwidth and Performance Problems
- Buffering When Publishing
- Snapshots, Stop Motion, and Time-Lapse Video
- Playing Streams in Detail
- Playing Live or Recorded Streams
- Creating playlists
- Stream Time
- Playback Events
- Playing MP3 Files
- Uploading Prerecorded Streams
- Buffering When Subscribing
- Detecting the End of the Stream
- Seeking Within a Stream
- Pausing and Unpausing a Stream
- Putting the User in Control
- NetStream.Buffer.Empty
- NetStream.Seek.Notify
- Managing Bandwidth
- Shutting off audio or video
- Capping client bandwidth usage
- Conferences and bandwidth
- The Stream Class
- Getting a Recorded Stream's Length
- Republishing with Stream Objects
- Server-side playlists
- Switching streams
- Chaining streams
- Recording streams
- Deleting Streams
- Deleting an FLV file with a NetStream object
- Deleting an FLV file with a Stream object
- Deleting MP3 and FLV files with the application object
- Publishing and Playing ActionScript Data
- Defining a Remote Method
- Sending a Request
- Stream logs
- Sending and recording events
- Creating Synchronized Presentations
- Adding Closed Captions
- Adding Synchronized Slides
- The NetStream and Stream Information Objects
- Stream Enhancements and Limitations
- Server-Side send( ) Enhancements
- Sound Performance
- ActionScript 2.0
- Synchronization Limitations
- Conclusion
- Microphone and Camera
- Working with Microphone/Audio Input
- Getting the Microphone/Audio Input
- Understanding Microphone Permissions
- Detecting the Microphone Privacy Setting
- Attaching and Publishing Audio
- Adjusting Microphone Settings
- Working with gain
- Working with rate
- Working with activity level
- Working with echo management
- Working with Camera Input
- Getting Camera Input
- Understanding Camera Permissions
- Attaching and Publishing Video
- Adjusting Camera Settings
- Working with modes
- Working with quality
- Working with keyframes
- Working with activityLevel
- Building a Message-Taking Application
- Building a Surveillance Application
- Conclusion
- Media Preparation and Delivery
- Audio and Video Compression
- The Sorenson Spark Codec
- Constant bit rate (CBR) compression
- Variable bit rate (VBR) compression
- The Speech Codec
- Prerecorded Versus FlashCom-Recorded Media
- The Screen Recording Codec
- Converting Prerecorded Material to FLV Format
- Recompressing Video Files
- Using Flash MX 2004 to Create FLV Files
- Exporting Video from QuickTime Player Pro with the FLV Exporter
- Optimizing Media with Sorenson Squeeze
- Creating Media with Wildform Flix Pro
- Using Flash Pro's Media Components
- MediaPlayback Component
- MediaController and MediaDisplay Components
- Enabling Multiple Bit Rate FLVs Within an Application
- Preparing the FLV Files
- Configuring the FCS Application
- Providing an Interface to Select and Switch the Streams
- Streaming MP3 Audio
- Considerations for MP3 Playback
- Using the MediaPlayback Component to Play MP3 Files
- Conclusion
- Part III
- Shared Objects
- Objects and Shared Objects
- Getting a Shared Object in Flash
- Getting and Using a Local Shared Object
- Getting and Using a Remote Shared Object
- Private versus shared data
- Updating Objects and Arrays in Shared Object Slots
- onSync( ) and Managing Change
- Yet Another Shared Ball Example
- Updates and Frame Rates
- Scripting Shared Objects on the Server
- Server-Side onSync( )
- Locking a Shared Object
- Clearing a Shared Object
- Checking the Size of a Shared Object
- Temporary and Persistent Shared Objects
- Synchronizing Temporary and Persistent Shared Objects
- Clearing and Deleting Persistent Shared Objects
- Locally and Remotely Persistent Shared Objects
- Using flush( ) to Write to a Persistent Shared Object
- Resynchronization Depth
- Proxied Shared Objects
- Lobby and Chat Room Example
- Shared Objects and Custom Classes
- Avoiding Collisions
- Optimizing Shared Object Performance
- Broadcasting Remote Method Calls with send( )
- Text Chat Example
- Differences Between Shared Objects and NetStream.send( )
- A Simple Video and Text Chat Application
- Designing with Shared Objects
- Conclusion
- Remote Methods
- Why Use Calls?
- The send( ) and call( ) Methods
- Client-to-Server Calls
- Simple call( ) Example: "Server, Limit My Bandwidth"
- Other Parameter Types
- Result Object Example: "Server, What Time Is It?"
- Another Example: "Server, How Long Is This Stream?"
- Client.method Versus Client.prototype.method
- Server-to-Client Calls
- Simple call( ) Example: "Client, Here's Your ID"
- Contacting Clients
- Looping through the clients array
- Using a Result Object: "Client, Are You OK?"
- Server-to-Server Calls
- A Simple Lobby/Rooms Application
- Using the Same Application Folder for the Lobby and Rooms
- The Lobby
- The client-side lobby.as code
- The server-side lobby.asc code
- The Room Application
- The client-side room.as code
- The server-side room.asc code
- Debugging Calls
- The Communication App Inspector Is Your Best Friend
- Error: msg sent before connection established
- Debugging Server-to-Server Calls
- Trapping onStatus Whenever Possible
- Advanced Topics
- Passing Variable Numbers of Arguments
- Making Calls Without Waiting for connect( )
- Reusing Result Objects
- Calling obj1/obj2/method and obj1.obj2.method
- Routing Remote Calls Through a Common Function
- Using a Façade Method on the Server-Side
- __resolve( ) and apply( )
- Using call( ) and send( ) together
- Using application.registerProxy( )
- Passing Objects as Parameters
- Conclusion
- Server Management API
- Connecting to the Admin Service
- Using the Server Management API
- Application Methods
- Instance Methods
- Server Methods
- broadcastMsg( )
- Other server-related methods
- Configuration API Methods
- Server Management API Uses
- Monitoring a FlashCom Server
- Polling Room Statistics
- Subscribing to the Log Streams
- Conclusion
- Flash Remoting
- The Remoting Gateway
- Remoting Basics
- Remoting Classes
- Google web service
- Services
- Methods
- Handling results
- Handling errors
- Passing Datatypes
- Custom classes
- Recordsets
- Action Message Format
- Role of Remoting in FlashCom Applications
- Securing Access
- Conclusion
- ColdFusion MX and FlashCom
- Understanding ColdFusion MX and Flash Remoting
- Using CFML and ColdFusion Components
- Using Flash Remoting with ColdFusion
- Determining the Flash Remoting gateway URL
- Determining the service address
- Calling the service method
- Passing parameters to a service method
- Handling return values
- Using Flash Remoting to Log Events
- Setting Up the Database
- Creating the Logger Class
- Creating the CFC
- Building the FlashCom Application
- Creating the Flash Client
- Viewing the Events
- Getting a List of Streams
- Setting Up the Streams
- Creating the CFC
- Writing the FlashCom Application
- Making the Streams Client
- Using ColdFusion and FTP to Mirror Streams
- Creating a Stream Manager
- Creating an FTP Server Class
- Using ColdFusion with FTP
- Making the FlashCom Application
- Creating the Publishing Client
- Conclusion
- Part IV
- Building Communication Components
- Source Files
- People Lists
- A Simple People List
- Building the Component
- Building the graphical interface
- Tying the list to the shared object
- Listenable Shared Objects
- Status and People List
- Designing and Building the Status Component
- Building the client-side Status component
- Building the server-side Status object
- Designing and Building a PeopleList Component
- Text Chat
- Text Chat Resources and Messaging
- TextChat message passing
- TextChat history
- TextChat message parsing
- Text Chat User Interface
- Connecting the User Interface and Shared Object
- Chat History
- Shared Text
- Video Conference and Video Window
- Publishing
- Playing
- PeopleGrid
- Summary
- Conclusion
- Understanding the Macromedia Component Framework
- The Component Framework
- Under the Hood of the Chat Component
- The Server-Side Code
- The Client-Side Code
- Enhancing the Chat: Creating MyChat
- Changing MyChat: Turning Off the Chat History
- Enhancing MyChat: Adding Special Commands
- Creating a Simple Component from Scratch: SharedTextInput
- The .fla File
- The Client-Side Class File
- The Server-Side Code
- A Sample Application That Uses SharedTextInput
- Creating a Container Component: SharedAddressForm
- The .fla File
- The Client-Side Code
- The Server-Side Code
- Using the SharedAddressForm Component
- Creating an Authenticating Component
- The Tester Application: AuthConnectTest
- The client side of AuthConnectTest
- The server side of AuthConnectTest
- The Client Side of AuthConnect
- The Server Side of AuthConnect
- A Sample CFC to Use with AuthConnect
- Integrating Components with Your Existing Applications
- The onConnectAccept and onConnectReject Events
- Referencing a Component Instance in main.asc
- Server-Side Events
- Understanding the Framework
- The Framework's Files
- The Framework's Data Structures
- Everything is based on a naming scheme
- The gFrameworkFC.components data structure
- The Client.prototype data structures
- The Framework's Memory Management
- How Components Are Registered and Instantiated
- The Framework's Method Routing
- The Framework's Code
- Analyzing components.asc
- Analyzing framework.asc
- Analyzing application.asc
- Analyzing facade.asc
- Analyzing component.asc
- Conclusion
- Application Design Patterns and Best Practices
- Shared Object Management
- One-to-One Owner/SharedObject Relationships
- Connecting and reconnecting
- One-to-Many Owner/Listeners Relationships
- Delegating Updates
- Slot Owners
- Update Sequence Options
- Interval Update Checks
- Populating Lists and DataGrids
- The __ID__ update problem
- Improving List and DataGrid update performance
- Moving Code to the Server
- Building Façades on the Server
- Server-Side Client Queues
- A Framework for Recording and Playing Back Componentized Applications
- What's Covered in This Section
- The PTextField Component
- The tester.fla file
- The tester.as file
- The main.asc file
- The PTextField.as file
- The PTextField.asc file
- The Recording and Playback Framework APIs
- The recording APIs
- The playback APIs
- Updating the Tester Application
- Client-side code
- Server-side code
- Making PTextField Recordable
- Making PTextField Replayable
- The Recording and Playback Framework Implementation
- The client-side framework (PRecorder.as)
- The server-side code (PRecorder.asc)
- Components and Component Frameworks
- Yet Another Component Framework?
- The PFCSComponent Base Classes
- The PFCSFramework Classes
- Conclusion
- Building Scalable Applications
- Coordinating Instances
- Managing Independent Instances
- Interinstance Communications
- Proxies
- Scalability and Load Balancing
- Media-on-Demand
- Client-side server selection
- Software server selection
- Network-level server selection
- One-Way Live Delivery
- Source clients
- Root server application instance
- Intermediate server instances
- Leaf server application instances
- Destination clients
- n-Way Live Communications
- Redundancy and Failover
- Conclusion
- Network Performance, Latency, and Concurrency
- Latency
- Measuring Latency
- Clock Synchronization
- Bandwidth
- Adapting to Bandwidth
- Measuring Bandwidth
- Latency, Bandwidth, and Performance
- Latency and SharedObject updates
- Concurrency
- Serializing Requests and the ActionScript Thread
- Asynchronous Callbacks
- Latency and Application State
- Living in the Future
- Conclusion
- Securing Applications
- The Three A's: Authentication, Authorization, and Accounting
- Authentication
- Network or Packet Sniffing
- One-Time Ticket Systems
- Requesting a ticket
- Generating a ticket and returning user information
- Authenticating against directory servers
- Connecting to FlashCom with a ticket
- Checking the ticket and returning user information
- Authentication in FlashCom
- One-time ticket systems summary
- One-Time Hash Systems
- Connecting twice with Flash
- Managing connection attempts in FlashCom
- Single Sign-On
- Web applications and portals
- Flash Remoting with FlashCom logins
- Checking Connection Information
- IP checks
- Referrer checks
- Agent checks
- Some Warnings and Caveats
- Flash Remoting
- Anonymous connections
- Authorization
- Role-Based Authorization
- Component-level authorization
- Implementing component-level authorization
- Granting temporary access
- Role-Based Remote Method Access
- Fine-Grained Access Controls
- Access Control Tables
- Anonymous Access Restrictions
- Accounting
- Server-Level Logging
- Access logs
- Bandwidth logs
- Collecting FlashCom Server logs
- Application-Level Logging
- Suggestions and References
- Conclusion
- About the Authors
- Brian Lesser
- Giacomo "Peldi" Guilizzoni
- Joey Lott
- Robert Reinhardt
- Justin Watkins
- Index
System requirements
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.