Handling events in a component-based application
When you develop applications, be aware that using components introduces explicit
and
onConnectAccept
events. When you use components, you must modify the
statement in your server-side code to include the
application.onConnectReject
handler should be either
onConnect
application.rejectConnection()
the explicit
acceptConnection()
indicating that the user has been granted or denied permission to the application, you should
place that code in the
statements.
If you're not using media components, you cannot use
application.onConnectReject
Each component can have its own
and
onConnectAccept
one to implement authentication; for example, the code in a component could query a
database and decide to accept or reject a user based on the user name and password stored in
the database.
For more information about
application.onConnectReject
The Camera class
This section includes recommendations to help you optimize your use of the Camera class,
including tips for turning the camera off after recording, matching camera settings to available
bandwidth and using one camera in multiple applications.
Turning the camera off
If your application uses a Camera object attached to a NetStream object to record data, the
camera will stay on after you finish recording. To turn off the camera after recording, use the
NetStream.attachVideo(false)
46
Using Media Classes
onConnectReject
event handlers. The last line (in order of execution) of your
application.acceptConnection()
. If your application requires additional code following
or
rejectConnection()
application.onConnectAccept
.
application.onConnect
, you can customize a component or create a new
onConnectReject
application.onConnectAccept
, see the Server-Side ActionScript Language Reference.
method.
events. You need to include code to handle these
application.onConnect
application.onConnectAccept
methods, such as a message
or
application.onConnectReject
application.onConnectAccept
handler. By using
and
and
or
and
Need help?
Do you have a question about the FLASH MEDIA SERVER 2-DEVELOPING MEDIA and is the answer not in the manual?
Questions and answers