发新话题
打印

请教

请教

我[小楼一夜听春雨]的动画没做完,不知错在哪里,能有老师帮忙指出就好了,谢谢了版主老师.

 

 

[]227

Action的图层下的第一帧在[动作一帧]面板中输入脚本    设定变量值

fficeffice" /> 

set variable: "thisx" = Getproperty ( "/drg1",_x )  //  取得组件 drg1 x 坐标

set variable: "thisY" = Getproperty ( "/drg1",_y )  //  取得组件 drg1 y 坐标

set variable: " spx " = Getproperty ( "/spin1",_x )  //  取得第一个文字[] x 坐标

set variable: " spy " = Getproperty ( "/spin1",_y )  //  取得第一个文字[] y 坐标

set variable: " difx "= thisx - spx // 求得drg1与第一个文字[] x坐标差

set variable: " dify "= thisy - spx // 求得drg1与第一个文字[] y坐标差

set variable: "stepx " = 1 // 设置x方向的增量为1

set variable: "stepy " = 1 // 设置y方向的增量为1

set variable: "xstp" = difx  / 10 //求得鼠标与第一个文字[] x坐标差的十分之一

set variable: "ystp" = dify / 10 //求得鼠标与第一个文字[] y坐标差的十分之一

set property ("/spin1", x position ) = spx + xstp // 设置第一个文字[] 的新位置的x坐标为原来的x坐标与差值的十分之一的和

set property ("/spin1", y position ) = spy + ystp // 设置第一个文字[] 的新位置的y坐标为原来的y坐标与差值的十分之一的和

 

[]图层一的第二帧,按F6键,使其变为关健帧,然后在[动作一帧]面板中输入如下脚本   228

 

 

 

set variable: "thisx" = Getproperty ( "/drg1",_x ) 

set variable: "thisY" = Getproperty ( "/drg1",_y ) 

set variable: " spx " = Getproperty ( "/spin1",_x ) 

set variable: " spy " = Getproperty ( "/spin1",_y ) 

set variable: " difx "= thisx - spx

set variable: " dify "= thisy - spx

set variable: "stepx " = 1

set variable: "stepy " = 1

set variable: "xstp" = difx / 10

set variable: "ystp" = dify / 10

set property ("/spin1", x position ) = spx + xstp

set property ("/spin1", y position ) = spY+ystp

 

 

 

 

 

 

 

 

 

[]229[6-7]action2图层1的第1帧上添加

 

 

set variable: "thisx" = Getproperty ( "/spin1",_x ) 

set variable: "thisY" = Getproperty ( "/spin1",_y ) 

set variable: " spx " = Getproperty ( "/spin2",_x ) 

set variable: " spy " = Getproperty ( "/spin2",_y ) 

set variable: " difx "= thisx - spx

set variable: " dify "= thisy - spY

set variable: "stepx " = 1

set variable: "stepy " = 1

set variable: "xstp" = difx / 10

set variable: "ystp" = dify / 10

set property ("/spin2", x position ) = spx + xstp

set property ("/spin2", y position ) = spy + ystp

 

 

 

 

[]229页图层1的第二帧,添加脚本

 

 

 

 

set variable: "thisx" = Getproperty ( "/spin1",_x ) 

set variable: "thisY" = Getproperty ( "/spin1",_y ) 

set variable: " spx " = Getproperty ( "/spin2",_x ) 

set variable: " spy " = Getproperty ( "/spin2",_y ) 

set variable: " difx "= thisx - spx

set variable: " dify "= thisy - spY

set variable: "stepx " = 1

set variable: "stepy " = 1

set variable: "xstp" = difx / 5

set variable: "ystp" = dify / 5

set property ("/spin2", x position ) = spx + xstp

set property ("/spin2", y position ) = spy + ystp

 

 

 

 

 

 

 

 

**错误** 符号=drag1, 图层=图层 1, =1: 1 : 参数的数目不正确;gotoAndPlay 必须在 1 2 之间。

     gotoAndPlay();

 

**错误** 符号=线的运动, 图层=图层 1, =15: 1 : 语句必须出现在 on/onClipEvent 处理函数中

     gotoAndPlay(1);

 

**错误** 符号=action, 图层=图层 1, =1: 1 : 语法错误。

     set variable: "thisx" = Getproperty ( "/drg1",_x )  //  取得组件 drg1 x 坐标

 

**错误** 符号=action, 图层=图层 1, =2: 1 : 语法错误。

     set variable: "thisx" = Getproperty ( "/drg1",_x ) 

 

**错误** 符号=action2, 图层=图层 1, =1: 1 : 语法错误。

     set variable: "thisx" = Getproperty ( "/spin1",_x ) 

 

**错误** 符号=action2, 图层=图层 1, =2: 1 : 语法错误。

     set variable: "thisx" = Getproperty ( "/spin1",_x ) 

 

**错误** 符号=action3, 图层=图层 1, =1: 1 : 语法错误。

     set variable: "thisx" = Getproperty ( "/spin1",_x ) 

 

**错误** 符号=action3, 图层=图层 1, =2: 1 : 语法错误。

     set variable: "thisx" = Getproperty ( "/spin1",_x ) 

 

**错误** 符号=action4, 图层=图层 1, =1: 1 : 语法错误。

     set variable: "thisx" = Getproperty ( "/spin1",_x ) 

 

**错误** 符号=action4, 图层=图层 1, =2: 1 : 语法错误。

     set variable: "thisx" = Getproperty ( "/spin1",_x ) 

 

**错误** 符号=action5, 图层=图层 1, =1: 1 : 语法错误。

     set variable: "thisx" = Getproperty ( "/spin1",_x ) 

 

**错误** 符号=action5, 图层=图层 1, =2: 1 : 语法错误。

     set variable: "thisx" = Getproperty ( "/spin1",_x ) 

 

**错误** 符号=action6, 图层=图层 1, =1: 1 : 语法错误。

     set variable: "thisx" = Getproperty ( "/spin1",_x ) 

 

**错误** 符号=action6, 图层=图层 1, =2: 1 : 语法错误。

     set variable: "thisx" = Getproperty ( "/spin1",_x ) 

 

**错误** 符号=action7, 图层=图层 1, =1: 1 : 语法错误。

     set variable: "thisx" = Getproperty ( "/spin1",_x ) 

 

**错误** 符号=action7, 图层=图层 1, =2: 1 : 语法错误。

     set variable: "thisx" = Getproperty ( "/spin1",_x ) 

 

动作脚本错误总数:16  报错:16

 

 

 

 

 

TOP

我做的未能完成的小楼一夜听雨声动画

我做的未能完成的小楼一夜听雨声动画      现在传不上去.

TOP

我也不会脚本的问题!不知道黄河老师会不会呢?

笑一笑 ,十年少 。恼一恼 ,老一老。
请保持您的童心呵!!

TOP

回复 1# 有信 的帖子

很抱歉,我也不懂这个问题,好像湄湖(版主),老呆(论坛元老)写过这方面的文章,你是不是可以去请教一下她(他)们。

TOP

发新话题