MACROMEDIA FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY Spezifikationen Seite 125

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 369
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 124
Sample Applications 47
6 To add a Video object to your library, open the Library panel (Window > Library) and add an
embedded Video object by selecting New Video from the librarys Options menu.
7 To add the Video object for playing back the recording, drag a Video object onto the Stage. In
the Property inspector, give it the instance name
Replay_video.
8 From the toolbox, select the Text tool and draw a text box. In the Property inspector (Window
> Properties), select Dynamic Text for the text box type, and give it the instance name
Status_msg.
9 To add the privacy message, select the Text tool and draw a text box. In the Property inspector,
select Static Text for the text box type. Type (or copy and paste) text such as the following text
into the text box: Your image will be recorded or broadcasted and could be published at a
later date. If you don’t approve, please exit this application.
Note: Please note that this text is provided merely as an example, and the precise wording of the text that you
use will be dictated by the nature of your application and/or service and any privacy, legal, or other issues raised
by your application and/or service.
10 Create a directory named doc_list in your flashcom application directory, and save the file as
doc_list.fla in this directory.
To write the client-side ActionScript for this sample:
1 Select the keyframe in the Timeline and open the Actions panel (Window > Actions).
2 In the Actions panel, stop the progress of the movie.
stop();
3
Create a new connection to the server, handle the status messages, and connect to the server.
// Create a connection
client_nc = new NetConnection();
// Handle status message
client_nc.onStatus = function(info) {
trace("Level: " + info.level + " Code: " + info.code);
}
// Connect to the application
client_nc.connect("rtmp:/doc_list/room_01");
4
Create a remote shared object to hold the recordings that the user will make.
// Create a remote shared object
rec_so = SharedObject.getRemote("recordings", client_nc.uri, false);
5
As new recordings are added to the shared object, update the play list.
// Update the list of recordings as new items are added
rec_so.onSync = function(list) {
_root.Play_list.removeAll();
// Fill list box with recordings
for (var i in _root.rec_so.data) {
_root.Play_list.addItem(i);
}
}
Seitenansicht 124
1 2 ... 120 121 122 123 124 125 126 127 128 129 130 ... 368 369

Kommentare zu diesen Handbüchern

Keine Kommentare