03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

stop();<br />

See also<br />

getBytesTotal (MovieClip.getBytesTotal method)<br />

getBytesTotal (MovieClip.getBytesTotal method)<br />

public getBytesTotal() : Number<br />

Returns the size, in bytes, of the movie clip. For movie clips that are external (the root SWF<br />

file or a movie clip that is being loaded into a target or a level), the return value is the<br />

uncompressed size of the SWF file.<br />

You can extend the methods <strong>and</strong> event h<strong>and</strong>lers of the MovieClip class by creating a subclass.<br />

Returns<br />

Number - An integer indicating the total size, in bytes, of the movie clip.<br />

Example<br />

The following example uses the _framesloaded property to start a SWF file when all the<br />

frames are loaded. If all the frames aren't loaded, the _xscale property of the movie clip<br />

instance loader is increased proportionally to create a progress bar.<br />

Enter the following ActionScript in Frame 1 of the Timeline:<br />

var pctLoaded:Number = Math.round(this.getBytesLoaded()/<br />

this.getBytesTotal()*100);<br />

bar_mc._xscale = pctLoaded;<br />

Add the following code to Frame 2:<br />

if (this._framesloaded

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!