· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Red5 Install/Red5 Chat/Action Script

Red5Install/Red5Chat/ActionScript




* Declaring functions, Using them in assignment statements
// 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()
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
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
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()
Posts the variables in the specified object to the specified URL.

* LoadVars.onLoad()
Invoked when a LoadVars.send() or LoadVars.sendAndLoad() operation has completed.

* myLoadVars.onLoad(success){}
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:
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
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.



sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2011-12-09 09:21:25
Processing time 0.0118 sec