background image

142

Client-Side ActionScript Language Reference

The following example shows how to publish and record a video, and then play it back.

/* This script publishes and records video.
The recorded file will be named "allAboutMe.flv". */
var my_nc:NetConnection = new NetConnection();
my_nc.connect("rtmp://localhost/allAboutMe/mySpeech");
var publish_ns:NetStream = new NetStream(my_nc);
publish_ns.publish("allAboutMe", "record");
publish_ns.attachVideo(Camera.get());

/* This script plays the recorded file.
Note that no publishing stream is required to play a recorded file. */
var my_nc:NetConnection = new NetConnection();
my_nc.connect("rtmp://localhost/allAboutMe/mySpeech");
var subscribe_ns:NetStream = new NetStream(my_nc);
subscribe_ns.play("allAboutMe");
my_video.attachVideo(subscribe_ns);// my_video is a Video object on the 

Stage.

See also

Camera class

NetStream.play()

NetStream.publish()

Video.clear()

Availability

Flash Player 6.

Flash Media Server (not required).

Usage

public clear() : Void

Parameters

None.

Returns

Nothing.

Description

Method; clears the image currently displayed in the Video object. This is useful when, for 
example, the connection breaks and you want to display standby information without having 
to hide the Video object.

Summary of Contents for FLASH MEDIA SERVER 2-CLIENT-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR FLASH MEDIA SERVER...

Page 1: ...Client Side ActionScript Language Reference for Flash Media Server 2...

Page 2: ...the link does not imply that Macromedia endorses or accepts any responsibility for the content on those third party sites Sorenson Spark video compression and decompression technology licensed from S...

Page 3: ...61 NetConnection class 64 NetStream class 76 SharedObject class 112 System class 137 Video class 139 Appendix A Client Side Information Objects 149 Camera information objects 151 LocalConnection info...

Page 4: ...4 Contents...

Page 5: ...r Flash Media Server and to understand how objects created on the client side are paired with those on the server Rside see Developing Media Applications ActionScript classes The following table lists...

Page 6: ...r remote location System class The System class contains properties related to certain operations that take place on the user s computer such as operations with shared objects local settings for camer...

Page 7: ...liveDelay NetStream liveDelay motionLevel Camera motionLevel motionTimeOut Camera motionTimeOut muted Camera muted Microphone muted name Camera name Microphone name names Camera names Microphone names...

Page 8: ...a setKeyFrameInterval setLoopback Camera setLoopback setMode Camera setMode setMotionLevel Camera setMotionLevel setQuality Camera setQuality setRate Microphone setRate setSilenceLevel Microphone setS...

Page 9: ...dialog box that lets the user choose whether to allow or deny access to the camera Make sure your Stage size is at least 215 x 138 pixels for the Camera class examples this is the minimum size Flash...

Page 10: ...ed by the video compression algorithm Camera loopback A Boolean value that specifies whether a local view of what the camera is capturing is compressed or uncompressed Camera motionLevel A numeric val...

Page 11: ...tting to Camera setMotionLevel If the camera is available but is not yet being used because neither Video attachVideo nor NetStream attachVideo has been called this property is set to 1 If you are str...

Page 12: ...ance to the Stage and give it the instance name my_video Add a NumericStepper component instance to the Stage and give it the instance name bandwidth_nstep Then add the following ActionScript to Frame...

Page 13: ...ies the maximum frame rate at which you would like the camera to capture data Example The following example detects the rate in frames per second that the camera captures data using the currentFps pro...

Page 14: ...rames per second that the camera captures data using the currentFps property and a ProgressBar instance Create a new video instance by selecting New Video from the Library options menu Add an instance...

Page 15: ...camera driver installed the user may specify the default camera driver in the Flash Player Camera Settings panel If no camera drivers are available or installed the method returns null If index is sp...

Page 16: ...re your Stage size is at least 215 by 138 pixels this is the minimum size Flash requires to display the dialog box When the user responds to this dialog box the Camera onStatus event handler returns a...

Page 17: ...options menu Add an instance to the Stage and give it the instance name my_video Add a Label component instance to the Stage and give it the instance name camera_lbl and a ComboBox component instance...

Page 18: ...ons menu Add an instance to the Stage and give it the instance name my_video Add a Label component instance to the Stage and give it the instance name dimensions_lbl Then add the following ActionScrip...

Page 19: ...l var my_cam Camera Camera get var my_video Video my_video attachVideo my_cam camera_lbl text my_cam index my_cam name this createTextField cameras_txt this getNextHighestDepth 25 160 160 80 cameras_t...

Page 20: ...mera setKeyFrameInterval Camera loopback Availability Flash Player 6 Flash Media Server not required Usage public loopback Boolean read only Description Property read only a Boolean value that specifi...

Page 21: ...d a Label component instance to the Stage and give it the instance name motionLevel_lbl a NumericStepper with the instance name motionLevel_nstep and a ProgressBar with the instance name motion_pb The...

Page 22: ...property for my_cam Camera instance to the value of the NumericStepper component instance Maintain the current motionTimeOut value of the my_cam Camera instance my_cam setMotionLevel motionLevel_nste...

Page 23: ...me 1 of the Timeline var motionLevel_lbl mx controls Label var motion_pb mx controls ProgressBar var motionTimeOut_nstep mx controls NumericStepper var my_cam Camera Camera get var my_video Video my_v...

Page 24: ...r message could be displayed if my_cam muted evaluates to true Create a new video instance by selecting New Video from the Library options menu Add an instance to the Stage and give it the instance na...

Page 25: ...ng New Video from the Library options menu Add an instance to the Stage and give it the instance name my_video Then add the following ActionScript to Frame 1 of the Timeline var my_cam Camera Camera g...

Page 26: ...onds to build the array In most cases you can just use the default camera Example The following example uses the default camera unless more than one camera is available in which case the user can choo...

Page 27: ...ust create a function to process its activity value To specify the amount of motion required to invoke Camera onActivity true and the amount of time that must elapse without activity before invoking C...

Page 28: ...et to true and this handler is invoked with an information object whose code property is Camera Muted When a SWF file tries to access the camera Flash Player displays a Privacy dialog box that lets th...

Page 29: ...Deny value to invoke the function System showSettings 0 See also Camera get Camera muted System showSettings Camera quality Availability Flash Player 6 Flash Media Server not required Usage public qua...

Page 30: ...minimum 0 quality_nstep maximum 100 quality_nstep stepSize 5 quality_nstep value my_cam quality function changeQuality my_cam setQuality my_cam bandwidth quality_nstep value quality_nstep addEventList...

Page 31: ...ow to set a value for keyframeInterval consider both bandwidth use and video playback accessibility For example specifying a higher value for keyframeInterval sending keyframes less frequently reduces...

Page 32: ...sing cost because the local view is not simply compressed it is compressed edited for transmission as it would be over a live connection and then decompressed for local viewing To set the amount of co...

Page 33: ...he camera does not have a native mode that matches all the parameters you pass Flash selects a capture mode that most closely synthesizes the requested mode This manipulation may involve cropping the...

Page 34: ...geFps Void my_cam setMode my_cam width my_cam height fps_ti text fps_lbl text Current my_cam fps fps fps_ti text my_cam fps Selection setSelection 0 2 fps_ti addEventListener enter changeFps See also...

Page 35: ...activity value of 100 Your activity value is less than your motion level value when you re not moving when you are moving activity values frequently exceed your motion level value This method is simi...

Page 36: ...function mode motion mode active_cam setMotionLevel 30 500 myVideoObject attachVideo active_cam See also Camera activityLevel Camera motionLevel Camera motionTimeOut Camera onActivity Camera setQuali...

Page 37: ...ity decreases To indicate that quality takes precedence pass 0 for bandwidth and a numeric value for quality Flash will use as much bandwidth as required to maintain the specified quality If necessary...

Page 38: ...e by selecting New Video from the Library options menu Add an instance to the Stage and give it the instance name my_video Add a Label component instance to the Stage and give it the instance name dim...

Page 39: ...e class N OT E Flash Player displays a Privacy dialog box that lets the user choose whether to allow or deny access to the microphone Make sure your Stage size is at least 215 x 138 pixels this is the...

Page 40: ...an array of strings reflecting the names of all available sound capture devices including sound capture cards and microphones Microphone rate The sound capture rate in kHz Microphone silenceLevel The...

Page 41: ...trols ProgressBar activityLevel_pb mode manual activityLevel_pb label Activity Level 3 activityLevel_pb setStyle themeColor 0xFF0000 this createEmptyMovieClip sound_mc this getNextHighestDepth var act...

Page 42: ...sound_mc this getNextHighestDepth var active_mic Microphone Microphone get sound_mc attachAudio active_mic gain_pb label Gain 3 gain_pb mode manual gain_pb setProgress active_mic gain 100 gain_nstep v...

Page 43: ...her to a MovieClip object see MovieClip attachAudio or to a NetStream object see NetStream attachAudio The NetStream object is available only with Flash Media Server Unlike objects that you create usi...

Page 44: ...stem showSettings 0 If the user selects Remember Flash Player no longer displays the Privacy dialog box for SWF files from this domain If Microphone get returns null either the microphone is in use by...

Page 45: ...this createEmptyMovieClip sound_mc this getNextHighestDepth var active_mic Microphone Microphone get sound_mc attachAudio active_mic mic_lbl text active_mic index active_mic name mic_cb dataProvider M...

Page 46: ...changes Microphone onStatus is invoked For more information see Microphone get Example This example gets the default microphone and checks whether it is muted var active_mic Microphone Microphone get...

Page 47: ...n Class property read only retrieves an array of strings reflecting the names of all available sound capture devices without displaying the Flash Player Privacy dialog box This array behaves the same...

Page 48: ...rence Microphone get Microphone name Microphone onActivity Availability Flash Player 6 Flash Media Server not required Usage public onActivity function active Boolean Parameters active A Boolean value...

Page 49: ...ia Server not required Usage public onStatus function infoObject Object Parameters infoObject A parameter defined according to the status message For more information about this parameter see Micropho...

Page 50: ...does not see this text this createTextField muted_txt this getNextHighestDepth 10 10 100 22 muted_txt autoSize true muted_txt html true muted_txt selectable false muted_txt htmlText a href asfunction...

Page 51: ...ic rate Number read only Description Property read only the rate at which the microphone is capturing sound in kHz The default value is 8 kHz if your sound capture device supports this value Otherwise...

Page 52: ...is normal volume Numbers below 50 specify lower than normal volume while numbers above 50 specify higher than normal volume Example The following example ensures that the microphone gain setting is le...

Page 53: ...ate See also Microphone rate Microphone setSilenceLevel Availability Flash Player 6 Flash Media Server not required Usage public setSilenceLevel silenceLevel Number timeOut Number Void Parameters sile...

Page 54: ...vity value of 100 After gain is appropriately adjusted your activity value is less than your silence value when you re not talking when you are talking the activity value exceeds your silence value Th...

Page 55: ...e function silenceLevel_pb setProgress active_mic activityLevel 100 active_mic onActivity function active Boolean if active silenceLevel_pb indeterminate false silenceLevel_pb setStyle themeColor halo...

Page 56: ...rophone Settings panel Echo suppression is an effort to reduce the effects of audio feedback which is caused when sound going out the speaker is picked up by the microphone on the same computer This i...

Page 57: ...vel_pb label Activity Level 3 useEchoSuppression_ch selected active_mic useEchoSuppression this onEnterFrame function activityLevel_pb setProgress active_mic activityLevel 100 var chListener Object ne...

Page 58: ...p maximum 100 silenceLevel_nstep value active_mic silenceLevel var nstepListener Object new Object nstepListener change function evt Object active_mic setSilenceLevel evt target value active_mic silen...

Page 59: ...user controls this value using a NumericStepper instance called silenceTimeOut_nstep The ProgressBar instance called silenceLevel_pb modifies its appearance depending on whether the audio stream is co...

Page 60: ...ovieClip getNextHighestDepth method used in this example requires Flash Player 7 or later If your SWF file includes a v2 component version 2 of the Macromedia Component Architecture use the DepthManag...

Page 61: ...pb setProgress active_mic activityLevel 100 var chListener Object new Object chListener click function evt Object active_mic setUseEchoSuppression evt target selected useEchoSuppression_ch addEventLis...

Page 62: ...from the microphone hardware To play live or recorded audio streaming from the Flash Media Server pass a NetStream object as source The same NetStream object can contain both audio and video informati...

Page 63: ...s play yourVideo flv this createEmptyMovieClip flv_mc this getNextHighestDepth flv_mc attachAudio my_ns var audio_sound Sound new Sound flv_mc Add volume buttons volUp_btn onRelease function if audio_...

Page 64: ...ia Server enables you to share audio video and data using the Macromedia Real Time Messaging Protocol RTMP For information on using Flash with an application server see http www macromedia com go flas...

Page 65: ...kes a command or method on the server NetConnection close Closes the connection with the server NetConnection connect Connects to an application on the Flash Media Server Property read only Descriptio...

Page 66: ...n object var my_nc NetConnection new NetConnection Get the name of the server from user input and assign it to a variable named myURL var myURL_str String serverName Connect to the service my_nc conne...

Page 67: ...object pass null p1 pN Optional parameters to be passed to the specified method Returns Nothing Description Method invokes a command or method on the server You must create a server side function to d...

Page 68: ...t need to recreate the shared object to reconnect Instead you can just call SharedObject connect to reestablish the connection to the shared object Also any data in the shared object that was queued w...

Page 69: ...ame parameter is omitted Flash Player connects to the application s default instance _definst_ By default RTMP connections use port 1935 and RTMPT connections use port 80 For example the following URI...

Page 70: ...ction sequence can enable connections to succeed that otherwise would not However during this connection sequence users may wait several seconds for multiple connection attempts to time out If you wan...

Page 71: ...d to the server Video and audio however are not queued during the connection process Any video or audio that is streaming from the server is ignored until the connection is successfully completed For...

Page 72: ...ew Monday my_nc connect rtmp www myserver com chatApp peopleWhoSew Tuesday For information on where recorded streams are stored on the server see NetStream publish Understanding file naming and domain...

Page 73: ...p com tcpage htm script Finally if you own a domain name have access to the DNS records of that domain name and have a static IP address for your Flash Media Server you can create address A records to...

Page 74: ...Availability Flash Player 6 Flash Communication Server MX 1 0 Usage my_nc isConnected Description Property read only a Boolean value indicating whether Flash Player is connected to the server true or...

Page 75: ...for the NetConnection object If you want to respond to this event handler you must create a function to process the information object sent by the server For more information see Client Side Informat...

Page 76: ...r play live real time data and previously recorded data You can also use NetStream objects to send text messages to all subscribed clients see NetStream send The following steps summarize the sequence...

Page 77: ...icrophone get Capture audio publish_ns attachVideo Camera get Capture video publish_ns publish todays_news Begin broadcasting These lines open a stream to play the video portion of the broadcast insid...

Page 78: ...client NetStream publish Publisher method sends streaming audio video and text messages from the client to the Flash Media Server optionally recording the stream during transmission NetStream receive...

Page 79: ...rentFps The number of frames per second being sent or received on the publishing or subscribing stream NetStream liveDelay The number of seconds of data in a subscribing stream s buffer in live mode N...

Page 80: ...data over this connection Publishing client contains this code my_nc NetConnection new NetConnection create NetConnection object my_nc connect rtmp myRTMPServer myDomain com app connect to server my_...

Page 81: ...vailable only to the publisher of the specified stream You can call this method before or after you call the NetStream publish method and actually begin transmitting Subscribers who want to hear the a...

Page 82: ...es of single frames used to create time lapse photography If this parameter is omitted Flash captures all video until you issue my_ns attachVideo null If you pass 0 Flash captures only a single video...

Page 83: ...setMode When you specify snapShotMilliseconds you are controlling how much time elapses during playback between recorded frames When you specify fps using Camera setMode you are controlling how much...

Page 84: ...user input var mySubj String subject Assuming the user named the stream webCamStream publish the live camera activity as webCamStream source_ns publish mySubj live See also the example for MovieClip a...

Page 85: ...deo1 flv var buffer_interval Number setInterval checkBufferTime 100 stream_ns function checkBufferTime my_ns NetStream Void var bufferPct Number Math min Math round my_ns bufferLength my_ns bufferTime...

Page 86: ...tream connection_nc stream_ns setBufferTime 3 my_video attachVideo stream_ns stream_ns play video1 flv var buffer_interval Number setInterval checkBufferTime 100 stream_ns function checkBufferTime my_...

Page 87: ...l pending NetStream play calls on the stream are cleared on the server subscribers no longer receive anything that was being published on the stream If this method is called from a subscribing stream...

Page 88: ...ion Property read only the number of frames per second being sent or received on the specified publishing or subscribing stream NetStream liveDelay Availability Flash Player 6 Flash Communication Serv...

Page 89: ...ted NetStream onCuePoint Availability Flash Player 8 Flash Media Server 2 Usage public onCuePoint function infoObject Object Parameters infoObject An object with the following properties Property Desc...

Page 90: ...when something happens that could be used to trigger other application events You can define cue points in an FLV file when you first encode the file or when you import a video clip in the Flash auth...

Page 91: ...h parameter name in the list and prints the parameter name and value var nc NetConnection new NetConnection nc connect null var ns NetStream new NetStream nc ns onCuePoint function infoObject Object t...

Page 92: ...e point2 onCuePoint parameters lights end type navigation time 16 02 name point3 The parameter name lights is an arbitrary name used by the author of the example video You can give cue point parameter...

Page 93: ...n the playhead is at the end of the video stream Example The code in this example starts by creating new NetConnection and NetStream objects Then it defines the onMetaData handler for the NetStream ob...

Page 94: ...stream in a playlist NetStream Play Switch or when a NetStream object has played to the end NetStream Play Complete If you want to respond to this event handler you must create a function to process t...

Page 95: ...more information see Client Side Information Objects on page 149 In addition to this NetStream onStatus handler Flash also provides a super function called System onStatus If NetStream onStatus is in...

Page 96: ...mes play Returns Nothing Description Method pauses or resumes playback of a stream This method is available only to clients subscribed to the specified stream not to the stream s publisher The first t...

Page 97: ...my_nc my_video attachVideo my_ns to play record1 my_ns play record1 0 1 false to play record2 my_ns play record2 0 1 false to play record3 my_ns play record3 0 1 false You click a button to pause whil...

Page 98: ...ameter can also be used to indicate whether the stream is live or recorded The default value for start is 2 which means that Flash first tries to play the live stream specified in name If a live strea...

Page 99: ...d immediately By default the value is true You can also specify a value of 2 or 3 for the reset parameter which is useful when playing recorded stream files that contain message data These values are...

Page 100: ...s Example 1 var my_nc NetConnection new NetConnection my_nc connect rtmp localhost appName appInstance var my_ns NetStream new NetStream my_nc my_video attachVideo my_ns To play a live stream named st...

Page 101: ...ay after record1 is done my_ns play live1 1 5 false Switch from live1 to record2 record2 will start to play after live1 plays for 5 seconds my_ns play record2 0 1 false Interrupt the current play and...

Page 102: ...med name flv The file is stored on the server in a subdirectory within the directory containing the server application If the file already exists it is overwritten For more information on where record...

Page 103: ...ory named yourAppsFolder lectureSeries streams Monday var my_nc NetConnection new NetConnection my_nc connect rtmp server domain com lectureSeries Monday var my_ns NetStream new NetStream my_nc my_ns...

Page 104: ...etStream receiveAudio Availability Flash Player 6 Flash Communication Server MX 1 0 Usage public receiveAudio receive Boolean Void Parameters receive A Boolean value that specifies whether incoming au...

Page 105: ...d specifies whether incoming video will play on the specified stream or specifies the frame rate of the video This method is available only to clients subscribed to the specified stream not to the str...

Page 106: ...eo false Don t display video being published Later my_ns receiveVideo 12 Display video at 12 FPS See also NetStream currentFps NetStream receiveAudio NetStream time NetStream seek Availability Flash P...

Page 107: ...if you want to seek to time 15 and there are keyframes only at time 11 and time 17 seeking actually starts from time 17 instead of time 15 This is an approximate seeking method that works well with co...

Page 108: ...to the publisher of the specified stream To process and respond to the message create a handler in the format my_ns HandlerName Flash Player does not serialize methods or their data object prototype v...

Page 109: ...0 but after 30 seconds only 5 seconds of data have been sent over the connection Flash may stop sending data to the buffer until more data has been sent to the client The client will receive the initi...

Page 110: ...e no data was sent When you stop publishing a stream by calling Netstream publish false the time property stops incrementing and is reset to 0 when you resume publishing the stream For a subscribing s...

Page 111: ...ns attachVideo active_cam publish_ns publish SomeData live play_ns play SomeData After 10 seconds play_ns time 10 You then stop sending data for a while publish_ns attachVideo false 10 seconds later y...

Page 112: ...object s properties to null before the application ends the calculator opens without any prior values the next time the application runs Storing and sharing data on a server A shared object can store...

Page 113: ...server domain com chat room3 var remote_so SharedObject SharedObject getRemote users my_nc uri true remote_so connect my_nc Create a remote shared object that is persistent on the server and on the c...

Page 114: ...red object with the same attributes but with a flat design that occupies three slots instead of one my_so data year someValue my_so data month someValue my_so data dayOfMonth someValue In this case be...

Page 115: ...can choose to make remote shared objects persistent on the client the server or both Local shared objects are always persistent on the client up to available memory and disk space By default Flash can...

Page 116: ...n be allotted to make room for the object Additionally if the user selects a value that is less than the amount of disk space currently being used for locally persistent data Flash warns the user that...

Page 117: ...lient that sent the message SharedObject setFps Specifies the number of times per second that a client s changes to a shared object are sent to the server Property read only Description SharedObject d...

Page 118: ...the shared object from the disk The reference to my_so is still active but my_so data properties are deleted Example The following example sets data in the shared object and then empties all of the da...

Page 119: ...lear SharedObject connect SharedObject flush SharedObject connect Availability Flash Player 6 Flash Communication Server MX 1 0 Usage myRemote_so connect myRTMPConnection Parameters myRTMPConnection A...

Page 120: ...OrRemote_so data Description Property the collection of attributes assigned to the data property of the object these attributes can be shared and or stored Each attribute can be an object of any of th...

Page 121: ...the object when it is closed create properties that are not named data to store them as shown in the following example var my_so SharedObject SharedObject getLocal superfoo my_so favoriteColor blue my...

Page 122: ...store the object this method returns pending If the user has permanently denied local information storage for objects from this domain or if Flash is unable to save the object for any reason this meth...

Page 123: ...ush Success or SharedObject Flush Failed For more information see Local disk space considerations on page 115 Example The following function gets a shared object my_so and fills writable properties wi...

Page 124: ...You can also set a timer to periodically flush the shared object onto the hard disk on the server application onAppStart function application my_so SharedObject get SharedObjName true setInterval fun...

Page 125: ...ject or gets a reference to an existing shared object This shared object can be read from or written to by SWF files delivered over non HTTPS connections If your SWF file is delivered over a non HTTPS...

Page 126: ...sulting SWF file loads the saved text from the shared object when it starts playing Every time the user presses Enter the text in the text field is written to the shared object To use this example dra...

Page 127: ...a user John See also SharedObject close SharedObject flush SharedObject getRemote SharedObject getRemote Availability Flash Player 6 Flash Communication Server MX 1 0 Usage SharedObject getRemote obje...

Page 128: ...returns null Description Method returns a reference to an object that can be shared across multiple clients by means of the Flash Media Server To create a shared object that is available only to the...

Page 129: ...ample no SharedObject BadPersistence error will result because remote03_so does not point to the same object as remote01_so var remote03_so SharedObject SharedObject getRemote someObject my_nc uri fal...

Page 130: ...shared objects created by the other SWF file When specifying persistence do not include a domain name To specify that the path for persistence should be the same as the SWF file without having to expl...

Page 131: ...object has the longer it takes to estimate its size For this reason estimating object size can have significant processing cost Therefore you may want to avoid using this method unless you have a spe...

Page 132: ...ction to process the information object generated by the shared object The information object has a code property containing a string that describes the result of the onStatus handler and a level prop...

Page 133: ...hange or delete A value of clear means either that you have successfully connected to a remote shared object that is not persistent on the server or the client or that all the properties of the object...

Page 134: ...different client my_so data x 20 Example The following examples creates or gets a remote shared object named position var myRemote_so SharedObject SharedObject getRemote position my_nc uri false The f...

Page 135: ...od broadcasts a message to all clients connected to myRemote_so including the client that sent the message To process and respond to the message create a function named handlerName attached to the sha...

Page 136: ...t of traffic between the client and the server For example if the connection between the client and server is relatively slow you may want to set updatesPerSecond to a relatively low value Conversely...

Page 137: ...rmation on the System class see the System class entry in the ActionScript 2 0 Language Reference System showSettings Availability Flash Player 6 Flash Media Server not required Usage public static sh...

Page 138: ...ra get Microphone get System useCodepage Availability Flash Player 6 Flash Media Server not required Usage public static useCodepage Boolean Description Flash Media Server sends text in UTF 8 format I...

Page 139: ...cking and deringing filters If your Flash content dynamically loads Flash Video using either progressive download or Flash Media Server you can use On2 VP6 video without having to republish your SWF f...

Page 140: ...eo 3 Drag the Video object to the Stage and use the Property inspector to give it a unique instance name such as my_video Do not name it Video Method summary for the Video class Property summary for t...

Page 141: ...the NetStream play command requires Flash Media Server a Camera object or null If source is null video is no longer played within the Video object You don t have to use this method if the FLV file co...

Page 142: ...ng stream is required to play a recorded file var my_nc NetConnection new NetConnection my_nc connect rtmp localhost allAboutMe mySpeech var subscribe_ns NetStream new NetStream my_nc subscribe_ns pla...

Page 143: ...deo deblocking Availability Flash Player 6 Flash Media Server not required Usage public deblocking Number Description Property indicates the type of deblocking filter applied to decoded video as part...

Page 144: ...nce called deblocking_cb to your file and then add the following ActionScript to your FLA or AS file var deblocking_cb mx controls ComboBox var my_video Video my_video is a Video object on the Stage v...

Page 145: ...Stream Play Start the height and width values will be 0 because the Video object doesn t yet have the height and width of the loaded FLV file Clip is the instance name of the movie clip that contains...

Page 146: ...ld smoothing_txt this getNextHighestDepth 0 0 100 22 smoothing_txt autoSize true var my_nc NetConnection new NetConnection my_nc connect null var my_ns NetStream new NetStream my_nc my_video attachVid...

Page 147: ...e video stream in pixels This value is the same as the Camera width property of the Camera object that is capturing or previously captured the video stream You may want to use this property for exampl...

Page 148: ...148 Client Side ActionScript Language Reference...

Page 149: ...ject with a level property of error and there is no function assigned to respond to it Flash processes a function assigned to System onStatus if it exists The following example illustrates how you can...

Page 150: ...These properties are noted as footnotes in the tables For NetStream NetConnection and remote shared objects which are available only with Flash Media Server the properties of the information objects...

Page 151: ...ess to a microphone To determine whether access to a microphone is currently denied or allowed use the Microphone muted property Code property Level property Meaning Camera Muted Status The user denie...

Page 152: ...s been shut down for example if the application is out of memory resources and must be shut down to prevent the server from crashing or the server has been shut down NetConnection Connect Closed Statu...

Page 153: ...nd to move to a particular location in the recorded stream but with invalid parameters NetStream Pause Notify Status The subscriber has paused playback NetStream Play Complete Status Playback has comp...

Page 154: ...ublishing has started NetStream Record Failed Error An error has occurred in recording for a reason other than those listed elsewhere in this table for example the disk is full NetStream Record NoAcce...

Page 155: ...name of the stream currently playing on the NetStream If you are streaming a playlist that contains multiple streams this information object will be sent each time you begin playing a different stream...

Page 156: ...Flush Failed Error A SharedObject flush method that returned pending has failed the user did not allot additional disk space for the shared object when Flash Player displayed the Local Storage dialog...

Reviews: