mApplication.getHostAddress()

Availability

Windows: Flash 8 or 9 AS2.0 SWF + mProjector 3.0; Windows 98/ME/NT Support: Flash 7 SWF + mProjector 2.0;

Macintosh: Flash 8 or 9 AS2.0 SWF + mProjector 1.2.5;

Usage

mApplication.getHostAddress(domain:String, target:Object, callbackFunction:String) : Void

Parameters

domain - Domain name i.e. "www.screentime.com".

target - Optional object that will be used as this of the callback function.

callbackFunction - The function that will be called periodically during the download.

Returns

Nothing.

Description

Method; Returns the IP address for specified host.

Example

This example checks for an internet connection. If it succeeds, the host is reachable and the connection is good.

// Windows Example
var isConnection:Boolean;
onGetHostAddressComplete = function(ipAddress) {
	isConnected = false;
	myHostAddress = 0;
	mApplication.trace("ipAddress "+ipAddress);
	if (ipAddress>0) {
		isConnected = true;
		myHostAddress = ipAddress;
	}
};

mApplication.getHostAddress("www.screentime.com", this, onGetHostAddressComplete);

See Also

mApplication.checkNetConnection()