Escape Function - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Parameters
- The target path of the movie clip to duplicate. This parameter can be either
target:Object
a String (e.g. "my_mc") or a direct reference to the movie clip instance (e.g. my_mc).
Parameters that can accept more than one data type are listed as type
.
Object
- A unique identifier for the duplicated movie clip.
newname:String
- A unique depth level for the duplicated movie clip. The depth level is a
depth:Number
stacking order for duplicated movie clips. This stacking order is similar to the stacking order
of layers in the Timeline; movie clips with a lower depth level are hidden under clips with a
higher stacking order. You must assign each duplicated movie clip a unique depth level to
prevent it from replacing SWF files on occupied depths.
Example
In the following example, a new movie clip instance is created called
An image is
img_mc.
loaded into the movie clip, and then the
clip is duplicated. The duplicated clip is
img_mc
called
, and this new clip is moved on the Stage so it does not overlap the original
newImg_mc
clip, and the same image is loaded into the second clip.
this.createEmptyMovieClip("img_mc", this.getNextHighestDepth());
img_mc.loadMovie("http://www.helpexamples.com/flash/images/image1.jpg");
duplicateMovieClip(img_mc, "newImg_mc", this.getNextHighestDepth());
newImg_mc._x = 200;
newImg_mc.loadMovie("http://www.helpexamples.com/flash/images/image1.jpg");
To remove the duplicate movie clip, you could add this code for a button called
.
myButton_btn
this.myButton_btn.onRelease = function(){
removeMovieClip(newImg_mc);
};
See also
,
removeMovieClip function
duplicateMovieClip (MovieClip.duplicateMovieClip
,
method)
removeMovieClip (MovieClip.removeMovieClip method)

escape function

escape(expression:String) : String
Converts the parameter to a string and encodes it in a URL-encoded format, where all
nonalphanumeric characters are replaced with % hexadecimal sequences. When used in a
URL-encoded string, the percentage symbol (%) is used to introduce escape characters, and is
not equivalent to the modulo operator (%).
Availability: ActionScript 1.0; Flash Lite 2.0
Global Functions
43

Advertisement

Table of Contents
loading

Table of Contents