1084:语法错误:在添加之前期待rightparen

时间:2017-10-24 09:30:29

标签: flash

我的代码有什么问题?我在adobe flash中收到此错误:

Scene 1, Layer 'Layer 2', Frame 2, Line 2, Column 13    1084: Syntax error: expecting rightparen before add.

这是代码:

// create random speed and xpos for this snowflake
set ("xpos" add c], random(200));
set ("speed" add c], Number(random(4))+2);
// duplicae a snowflake
flake0.duplicateMovieClip ("flake" add c, c);
// set x position and random size
this["flake" add c]._x = eval("xpos" add c);
size = Number(random(50))+25;
this["flake" add c]._xscale = size;
this["flake" add c]._yscale = size;
//move each snowflake down by its speed;
for(i=1;i<=maxflakes;i++) {
    this["flake" add i]._y = this["flake" add i]._y + eval("speed" add i);
    i = i+1;
}

1 个答案:

答案 0 :(得分:1)

set ("xpos" add c], random(200));

这是不正确的。在&#34; xpos&#34;之后会有逗号。或者你应该关闭括号。