Using. net, flex, and red5 to create a flash Web Application

Source: Internet
Author: User
This project I developed recently is a web conference application.
I used. net with C # To write the Web service providing the data access layer (DAL) to the Flash application for authentication and account management. red5 Server is an open source "Flash stream server", Java is applyed here to write some handlers to process the stream data including the video and audio. went without saying, Flex is used to develop the interface of the webside. the red5 server and flash client is two way interaction, which means the flash client is able to send a request to the red5 server, so does red5, which can invoke client functions as well.

Here I post the source code, you have to understand some concepts of red5 before reading:
1. the scope in red5
A scope is used to group resouces, an application has two kinds of scope. one is the app scope, the root scope in an application. second is the Child scope. they are formed in a tree structure.
2. Scope in my application
U'll see the source code in the application. java, there are a hall and have rooms. you will enter the hall after authentication, and can create or join a room in the hall. notice that both Hall and room are child scopes. hall scope is created only once by red5 automatically while the first user entering the hall. room scope is created when a user start a new room.
3. message exchange
The Flash client can send public message or publish video/audio stream to the red5 server, and then these messages or stream data will be transmit to the users who are in the same room. itz real time and asynchronous.

How to make it work:
1. Having ms SQL Server.
Create a database named "XYZ" and create a table named "users" with 5 columns: ID (PK), password, email, sex, and description. you can get it done by running the dbscript.txt in your MS-SQL Server after the creation of database.
2. Running Web Service
You can run the WebService directly with vistual Studio 2005, or put the Web service in IIS. if u run it in vs2005, u might have to change the port number in the Flash client. make sure it works.
3. Running flash
Open the flash client code source with Flex builder 2.1 (can download from adobo), compile it, you 'd better put the bin code in IIS as well.
4. Running red5 Server
I used eclipse to developed the red5 handler, there might be some problems of using eclipse to make red5 running at the beginning. search the solusion in red5 webside http://osflash.org/red5, and create a new application called "xyztalk", u can directly import my code into your red5 project. and finally build it.
5. Done
Once you get everything done correctly, u will see the beautiful interface (no? Dam !) Below:

Login:

Register:

Hall:

Room:

Download URL:
/Files/WJ/xyz.rar

BTW, I didn't finish the shaing files part, yup. If any recommendations or bugs U Firgure out, just leave MSG or send me an email.
Enjoy ~ Bye ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.