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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Example<br />

The following example creates a new movie clip someClip_mc <strong>and</strong> shows the alpha value<br />

(_alpha) for the movie clip someClip_mc in the Output panel:<br />

this.createEmptyMovieClip("someClip_mc", 999);<br />

trace("The alpha of "+getProperty(someClip_mc, _name)+" is:<br />

"+getProperty(someClip_mc, _alpha));<br />

getTimer function<br />

getTimer() : Number<br />

Returns the number of milliseconds that have elapsed since the SWF file started playing.<br />

Returns<br />

Number - The number of milliseconds that have elapsed since the SWF file started playing.<br />

Example<br />

In the following example, the getTimer() <strong>and</strong> setInterval() functions are used to create a<br />

simple timer:<br />

this.createTextField("timer_txt", this.getNextHighestDepth(), 0, 0, 100,<br />

22);<br />

function updateTimer():Void {<br />

timer_txt.text = getTimer();<br />

}<br />

var intervalID:Number = setInterval(updateTimer, 100);<br />

getURL function<br />

getURL(url:String [, window:String [, method:String] ]) : Void<br />

Loads a document from a specific URL into a window or passes variables to another<br />

application at a defined URL. To test this function, make sure the file to be loaded is at the<br />

specified location. To use an absolute URL (for example, http://www.myserver.com), you<br />

need a network connection.<br />

Note: This function is not supported for BREW devices.<br />

Parameters<br />

url:String - The URL from which to obtain the document.<br />

Global Functions 47

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

Saved successfully!

Ooh no, something went wrong!