Flash 动作脚本 tweenlite 1084
Posted
技术标签:
【中文标题】Flash 动作脚本 tweenlite 1084【英文标题】:Flash action script tweenlite 1084 【发布时间】:2013-10-05 10:20:45 【问题描述】:我是 Flash 初学者,我在操作脚本 3.0 中遇到错误
我正在使用 tween lite
我收到错误 1084:语法错误:在逗号之前需要冒号。
关于这条线
TweenLite.to(balk_mc, 1, x:141,35, y:balk_mc.y);
上面写着第 10 行和第 16 行
我使用的整个代码是:
import flash.events.MouseEvent;
import com.greensock.*;
stop();
button1.addEventListener(MouseEvent.CLICK, button1_clicked);
function button1_clicked(e:MouseEvent):void
gotoAndStop("page1");
TweenLite.to(balk_mc, 1, x:141,35, y:balk_mc.y);
button2.addEventListener(MouseEvent.CLICK, button2_clicked);
function button2_clicked(e:MouseEvent):void
gotoAndStop("page2");
TweenLite.to(balk_mc, 1, x:330,6, y:balk_mc.y);
button3.addEventListener(MouseEvent.CLICK, button3_clicked);
function button3_clicked(e:MouseEvent):void
gotoAndStop("page3");
TweenLite.to(balk_mc, 1, x:551, y:balk_mc.y);
var number:Number = 1;
next_btn.addEventListener(MouseEvent.CLICK, nextImage);
checkNumber();
function nextImage(event:MouseEvent):void
//trace("next button geklikt!");
number++;
loader.source = "images/tommorrowland"+number+".png";
checkNumber();
previous_btn.addEventListener(MouseEvent.CLICK, previousImage);
function previousImage(event:MouseEvent):void
//trace("previous button geklikt!");
number--;
loader.source = "images/tommorrowland"+number+".png";
checkNumber();
function checkNumber():void
next_btn.visible = true;
previous_btn.visible = true;
if(number == 4)
next_btn.visible = false;
if(number == 1)
previous_btn.visible = false;
button4.addEventListener(MouseEvent.CLICK, button4_clicked);
function button4_clicked(e:MouseEvent):void
gotoAndStop("page4");
TweenLite.to(balk_mc, 1, x:551, y:balk_mc.y);
【问题讨论】:
【参考方案1】:你写的是141,35
而不是141.35
。这是打字错误。编码语言中的数字是用一个点写的。 330,6
你的代码也是如此。
【讨论】:
以上是关于Flash 动作脚本 tweenlite 1084的主要内容,如果未能解决你的问题,请参考以下文章