Lingo Dictionary > L-N > netDone() |  |

netDone()

Syntax

    netDone()
    netDone(netID)

Description

Function; indicates whether a background loading operation (such as `getNetText, preloadNetThing, gotoNetMovie`, `gotoNetPage`, or `putNetText)` is finished or was terminated by a browser error (`TRUE,` default) or is still in progress (`FALSE`).

| Use `netDone()` to test the last network operation.
| Use`netDone(``netID``)` to test the network operation identified by `netID`.

The `netDone` function returns 0 when a background loading operation is in progress.

Example

This handler uses the `netDone` function to test whether the last network operation has finished. If the operation is finished, text returned by `netTextResult` is displayed in the field cast member Display Text.

    on exitFrame
    	if netDone() = 1 then
    		member("Display Text").text = netTextResult()
    	end if
    end

Example

This handler uses a specific network ID as an argument for `netDone` to check the status of a specific network operation:

    on exitFrame
    	-- stay on this frame until the net operation is
    	-- completed
    	global mynetID
    	if netDone(mynetID) = FALSE then
    		go to the frame
    	end if
    end

See also

`getNetText()`, `netTextResult()`, `gotoNetMovie`, `preloadNetThing()`