originalCode + reference ==success !!!
Flashmx有很多地方借鉴了Dreamweaver
例如 Properties panel
但是我认为reference panel 的引入将使你
在编写actionScript中获得巨大的方便!!!
它的热键是shift+F1,但是我一般不是这样用的。
在看别人的原代码时,选中一个暗蓝色的保留字,
然后按那个位于Action panel右侧的小书本图标,
就会弹出关于你选中的xx的具体解释及用法。像这样:
duplicateMovieClip
Availability
Flash Player 4.
Usage
duplicateMovieClip(target, newname,depth)
Parameters
[target] The target path of the movie clip to duplicate.
[newname] A unique identifier for the duplicated movie clip.
[depth] A unique depth level for the duplicated movie clip. The depth level is a stacking order for duplicated movie clips. This stacking order is much like 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 movies on occupied depths.
[Returns]
[Nothing.]
Description
Action; creates an instance of a movie clip while the movie is playing. The playhead in duplicate movie clips always starts at Frame 1, regardless of where the playhead is in the original (or "parent") movie clip. Variables in the parent movie clip are not copied into the duplicate movie clip. If the parent movie clip is deleted the duplicate movie clip is also deleted. Use the removeMovieClip action or method to delete a movie clip instance created with duplicateMovieClip.
Example
This statement duplicates the movie clip instance flower ten times. The variable i is used to create a new instance name and a unique depth for each duplicated movie clip.
on (release) {
amount = 10;
while (amount>0) {
duplicateMovieClip (_root.flower, "mc"+i, i);
setProperty ("mc"+i, _x, random(275));
setProperty ("mc"+i, _y, random(275));
setProperty ("mc"+i, _alpha, random(275));
setProperty ("mc"+i, _xscale, random(50));
setProperty ("mc"+i, _yscale, random(50));
i++;
amount--;
}
}
See also
MovieClip.duplicateMovieClip
removeMovieClip
MovieClip.removeMovieClip
怎么样,很详细吧。