
48
Example
This example defines a function for the onStatus handler that outputs messages to indicate
whether the NetConnection was successful:
nc = new NetConnection();
nc.onStatus = function(info){
if (info.code == "NetConnection.Connect.Success") {
_root.gotoAndStop(2);
} else {
if (! nc.isConnected){
_root.gotoAndStop(1);
}
}
};
NetConnection.uri
Availability
Flash Communication Server MX.
Usage
myNetConnection.uri
Description
Property (read-only); A string indicating the URI that was passed by the
NetConnection.connect method. This property is set to null before a call to
NetConnection.connect or after NetConnection.close is called.
setInterval
Availability
Flash Communication Server MX.
Usage
setInterval(function, interval[, p1, ..., pN]);
setInterval(object, methodName, interval[, p1, ..., pN]);
Parameters
function The name of a defined ActionScript function or a reference to an anonymous
function.
object An object derived from the ActionScript Object object.
methodName The name of the method to call on object.
interval The time (interval) between calls to function, in milliseconds.
p1, ..., pN Optional parameters passed to function.
Returns
A unique ID for this call. If the interval is not set, the method returns -1.
Comentarios a estos manuales