Chapter 7. Working With Server-Side Files: The File Class
Recording Data
This chapter explores recording data using Flash Media Server 3. We’ll look at the server side File class. This class allows developers to create applications that can store information in text (TXT) files, as well as binary and UTF-8 files, in a secure location on the server side along with the ASC files and recorded FLV files.
Tip
As you start using more server-side scripts, you’ll see a number of differences between ActionScript 3.0 on the client-side and server-side ActionScript (SSAS). ActionScript 3.0 meets the ECMAScript 4 standard, while SSAS is JavaScript with a few additional classes for Flash Media Server. Most important is the use of data typing—stating a data type for your objects. In ActionScript 3.0, the correct way to type data in declarations, parameters, and function returns is to place a colon (:) in front of the data type. For example, the following are all accepted in ActionScript 3.0, while none are accepted in SSAS:
private var myList: Array=new Array("A", "B", "C"); protected var manyWords:String; public function shedArea(H:Number, W:Number):Number private function getData( ) :void ....
So as you get into the habit of typing data in your client-side code, remember that your server-side data is not typed. The data typing issue can be seen in the code in previous chapters that discussed server-side ActionScript, but not in this chapter, because so much of the code is server side ActionScript, ...
Get Learning Flash Media Server 3 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.