getPercentLoaded() +
Top  Previous  Next


SWiSH Player Support
SWF4 or later - Supported Internally

Syntax
spritename.getPercentLoaded()

Arguments
None.

Returns
An integer indicating the current percentage of the total bytes loaded for the specified target.

Description
Read-only property returns the current percentage of the total bytes loaded for the specified target. This is the same as multiplying the result of getBytesLoaded by 100 then dividing by the result of getBytesTotal. This method is SWiSHscript specific and is not supported by Flash MX.

Sample
onFrame (1
{
    p = _root.getPercentLoaded();
}

// the variable 'p' will have a value indicating the total percentage of bytes loaded for the root path at Frame 1.