[转] Flashcom develops reading notes 1

xiaoxiao2021-03-06  248

Content: I am learning FlashCom Develop reading notes, one after another solely for informational purposes, not for it with experience of: Liu21st first to start a chapter, FlashCom develop the necessary hardware and software installed:... 1 FlashMX authoring2 FlashMX Communication Server3 ActionScript Editor 4. Flash Player5. Camera and MicoPhone II. Setting the Development Environment 1. Make sure the flashcom server has started 2. Change the URL address of the Flashcom Server new_nc.connect ("RTMP: / VIDEO / ROOM_01"); / / Local server or use new_nc.connect ("RTMP: //www.liu21st.com/video/room_01"); // Remote Server If you use the SimpleConnect component, set it directly in the properties of the component 3. Specify the published format. For HTML and SWF4. Write Client-Side's AS scripts, generally written in the first frame 5. Writing Server-Side ASC scripts, generally corresponding to map_name.asc6 corresponding to main.asc or components. Loading components, if using the default component You can simply load the load ("Components.asc") by the following statement; // This file is below the scriptlib directory 7. Initialize the Client-Side code. Add the following code #include "netdebug.as" to the first line for NetConnection Debug (PS. New version of Flashcom Server does not include NetDebug.as files, you need to install Flash Remote) 8. Monitoring applications Monitor and manage the application manager and management tools comes with Flashcom [Chinese version See here] 3, Regular development steps 1. Set the application directory and establish the corresponding subdirectory in the server-side Application Directory (that is, the directory placed by the project main.asc file) Remember any change in the server side It is necessary to restart the flashcom server to take effect 2. Establish a link at the client.

MY_NC = New NetConnection ();

MY_NC.CONNECT ("RTMP: //www.liu21st.com/app_name"); // App_name is the new sub-directory name

3. Save the client's FLA file to anywhere (if it is recommended to save the background interaction, it is recommended to save it in the webserver directory)

4. If you need the corresponding Server file of the server side, please copy to the corresponding directory of the Server side (it is recommended to keep the same file name as the client, but only the suffix is ​​different)

5. Then post your SWF file and run

Default server-side ASC file storage location in C: / Program Files / Macromedia / Flash

Communication Server MX / Applications in Windows OR / OPT / Macromedia / Flashcom / Applications

ON UNIX. When you need to create a CommunCIATION application, you need to build a subdirectory below Applications, store the following data files:

ASC server communication file

FLV data stream playback file

FSO remote shared object data file

The client's SWF and HTML (or PHP, etc. server files) can be placed in any directory you specified, and you need to remove the FLA source file when the product is released.

Examples of each application are also located in different directories, such as MY_NC.CONNECT ("RTMP: //www.liu21st.com/chatapp/Room_01")

MY_NC.CONNECT ("RTMP: //www.liu21st.com/chatapp/room_02")

If you do not specify an instance, the client is actually connected to an instance called _definst_, and can establish different shared objects for different instances.

01:

// One instance of coplication "support"

02: first_nc =

NEW NETCONNECTION ();

03: first_nc.connect ("MyServer.Mydomain.com/support/ession1");

04: first_so = sharedobject.getremote ("CustomerInfo", First_nc.uri, False;

05: first_so.connect (first_nc.uri);

06:

07:

// another instance of application "support"

08: Second_nc = new netConnection ();

09: Second_nc.connect ("MyServer.Mydomain.com/support/ession2");

10: Second_SO = SharedObject.getRemote ("CustomerInfo", Second_nc.uri, False;

11: Second_So.connect (Second_nc.uri);

Fourth, file types used in FlashCom

1. File types used by ASC and JS files

Flash Communication Server provides a scripted library in the server's ScriptLib directory, contains some components and Flash Remoting Services. Server end scripts

2. FLV and IDX file video play files and index files

3. SOL, SOR and FSO file sharing object data file (sequentially local, remote and both)

转载请注明原文地址:https://www.9cbs.com/read-128922.html

New Post(0)