Using Communication Components > SimpleConnect component |
![]() ![]() ![]() |
SimpleConnect component
This component handles connecting a user to Macromedia Flash Communication Server and connecting any other specified components in the application to the server. The component also displays the user name and has an interface for the user to change his or her name.
The SimpleConnect component logs a user in by retrieving data from a local shared object that is created the first time the user attempts to log in. The use of the local shared object provides some continuity among connections and prevents the user from logging out of an application without exiting.
To use this component, drag it into your movie and edit the component parameters, which are located in the Property inspector. You need to supply the application's directory, such as rtmp:/test, and a list of any other communication components that you want to connect automatically.
This component is designed to work with all other communication components to simplify handling the NetConnection object. It lets you construct a new communication application using communication components with little or no ActionScript.
Tip: The component you want to register with the SimpleConnect component must be on the stage when the SimpleConnect component initializes. If you do not want the component to be visible in the same frame, have the component on stage but out of sight (_visible = false) in the same frame as the SimpleConnect component. Or, when the component that you want connected does appear on the stage, add an explicit component.connect(); to your code at that time.
![]() ![]() ![]() |