== Red5Install/Red5Chat/ActionScript == * http://www.markomedia.com.au/flex/customise-red5-applications-and-broadcast-messages-to-flex-howto/ * http://blog.cirtex.com/2010/06/24/tutorial-to-make-a-white-board-using-red5-and-flash/ * Declaring functions, Using them in assignment statements {{{#!vim // declaring (and defining) a function named makePictureWider function makePictureWider() { picture_mc._xscale *= 1.5; } // assigning that function to a movieclip property control_mc.onRelease = makePictureWider; // assigning an unnamed function to a movieclip property // because this is an assignment statement, it has a semicolon at the end // its effect is the same as the two examples above combined control_mc.onRelease = function() { picture_mc._xscale *= 1.5; }; }}} * TransitionManager.start() {{{#!vim The following code uses the TransitionManager.start() method to create an instance of TransitionManager and assigns an Iris transition to a movie clip called img1_mc. The TransitionManager.start() method contains two parameters. The first parameter, content, is the MovieClip object that the transition effect will be applied to. The second parameter for the TransitionManager.start() method, transParam, contains an object that holds a parameter collection. This object that contains a parameter collection first designates the type of transition effect with the type parameter, followed by the direction, duration, and easing parameters. The type, direction, duration, and easing parameters are required information for all TransitionManager effects. Following the easing parameter are any parameters that the transition type specifically requires. In the following example, the Iris transition is the type of transition, and the Iris transition requires the startPoint and shape parameters (for more information about the Iris transition parameters, see Iris transition): import mx.transitions.*; import mx.transitions.easing.*; TransitionManager.start(img1_mc, {type:Iris, direction:Transition.IN, duration:5, easing:Bounce.easeOut, startPoint:5, shape:Iris.CIRCLE}); }}} * addEventListener("enter",loginKeyDown) * "enter" ÀÌ ¾îµð¿¡¼­ Á¤ÀǵǾî ÀÖ´ÂÁö ¸ð¸£°ÚÀ½. * FlexEvent {{{#!vim FlexEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false) Constructor. ENTER : String = "enter" [static] The FlexEvent.ENTER constant defines the value of the type property of the event object for a enter event. }}} * LoadVars class {{{#!vim The LoadVars class lets you send all the variables in an object to a specified URL and lets you load all the variables at a specified URL into an object. It also lets you send specific variables, rather than all variables, which can make your application more efficient. You can use the LoadVars.onLoad() handler to ensure that your application runs when data is loaded, and not before. }}} * LoadVars.sendAndLoad() {{{#!vim Posts the variables in the specified object to the specified URL. }}} * LoadVars.onLoad() {{{#!vim Invoked when a LoadVars.send() or LoadVars.sendAndLoad() operation has completed. }}} * myLoadVars.onLoad(success){} {{{#!vim If the variables load successfully, the success parameter is true. If the variables were not received, or if an error occurred in receiving the response from the server, the success parameter is false. If the success parameter is true, the myLoadVars object is populated with variables downloaded by the LoadVars.load() or LoadVars.sendAndLoad() operation, and these variables are available when the onLoad() handler is invoked. }}} * The following example creates a new LoadVars object, * attempts to load variables into it from a remote URL, * and prints the result: {{{#!vim myLoadVars = new LoadVars(); myLoadVars.onLoad = function(result){ trace("myLoadVars load success is " + result); } myLoadVars.load("http://www.someurl.com/somedata.txt"); }}} * NetConnection * connect(command:String, ... arguments):void {{{#!vim Creates a two-way connection to an application on Flash Media Server or to Flash Remoting, or creates a two-way network endpoint for RTMFP peer-to-peer group communication. To report its status or an error condition, a call to NetConnection.connect() dispatches a netStatus event. }}}