flash代码错误(五星龙制作中遇到的问题)

来源:百度知道 编辑:UC知道 时间:2024/05/28 09:35:26
**错误** 符号=control, 图层=图层 1, 帧=1:第 6 行: 需要 ')' 或 ','
duplicateMovieClip("_root.star","star" add counter,counter);

**错误** 符号=control, 图层=图层 1, 帧=1:第 8 行: 需要 ')' 或 ','
setProperty("_root.star" add counter,_rotation,360-(360/n)*counter);

**错误** 符号=control, 图层=图层 1, 帧=2:第 3 行: 需要 ')' 或 ','
setProperty("_root.star" add counter, _x,getProperty("_root.star" add counter,_x)+(getProperty("_root.star" add (counter-1),_x)-getProperty("_root.star" add counter,_x))/r);

ActionScript 错误总数:3 报错:3

”ctrl“影片剪辑的第一帧动作源代码:
i=36;
n=12;
r=3;
counter=1;
while(Number(counter)<=Number(i)){//执行动作的条件
duplicateMovieClip("_root.star","star" add counter,counter);
//复制star对象
setProperty("_root.star" add counter,_rotation,360-(360/n)*counter);
//设置新的影片剪

你看下下面的代码能不能用,有什么问题

onClipEvent (load) {
i = 36;
n = 12;
r = 3;
counter = 1;
while (Number(counter)<=Number(i)) {
//执行动作的条件
duplicateMovieClip("_root.star", "star"+counter, counter);
//复制star对象
setProperty("_root.star"+counter, _rotation, 360-(360/n)*counter);
//设置新的影片剪辑的旋转角度
setProperty("_root.star"+counter, _alpha, 100-(100/i)*counter);
//设置新的影片剪辑的透明度
counter = Number(counter)+1;
//复制一个对象,变量增加1
}
setProperty("_root.star", _visible, false);
//将star对象设置为不可见
x = getProperty("_root.star0", _x);
y = getProperty("_root.star0", _y);
//坐标值基于star0影片剪辑的坐标 CTRL第二帧动作代码:
counter = 1;
while (Number(counter)<=Number(i)) {
setProperty("_root.star"+counter, _x, getProperty("_root.star"+counter, _x)+(getProperty("_root.star"+(counte