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.

Returns a r<strong>and</strong>om integer between 0 <strong>and</strong> one less than the integer specified in the value<br />

parameter.<br />

Parameters<br />

value:Number - An integer.<br />

Returns<br />

Number - A r<strong>and</strong>om integer.<br />

Example<br />

The following use of r<strong>and</strong>om() returns a value of 0, 1, 2, 3, or 4: r<strong>and</strong>om(5);<br />

See also<br />

r<strong>and</strong>om (Math.r<strong>and</strong>om method)<br />

removeMovieClip function<br />

removeMovieClip(target:Object)<br />

Deletes the specified movie clip.<br />

Parameters<br />

target:Object - The target path of a movie clip instance created with<br />

duplicateMovieClip() or the instance name of a movie clip created with<br />

MovieClip.attachMovie(), MovieClip.duplicateMovieClip(), or<br />

MovieClip.createEmptyMovieClip().<br />

Example<br />

The following example creates a new movie clip called myClip_mc <strong>and</strong> duplicates the movie<br />

clip. The second movie clip is called newClip_mc. Images are loaded into both movie clips.<br />

When a button, button_mc, is clicked, the duplicated movie clip is removed from the Stage.<br />

this.createEmptyMovieClip("myClip_mc", this.getNextHighestDepth());<br />

myClip_mc.loadMovie("http://www.helpexamples.com/flash/images/image1.jpg");<br />

duplicateMovieClip(this.myClip_mc, "newClip_mc",<br />

this.getNextHighestDepth());<br />

newClip_mc.loadMovie("http://www.helpexamples.com/flash/images/<br />

image1.jpg");<br />

newClip_mc._x = 200;<br />

this.button_mc.onRelease = function() {<br />

removeMovieClip(this._parent.newClip_mc);<br />

};<br />

Global Functions 73

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

Saved successfully!

Ooh no, something went wrong!