vim 光标上移脚本_Flash脚本-光标响应文本

vim 光标上移脚本

1. Create a text field, name it "txt", and then convert it to a movieclip.

1.创建一个文本字段,将其命名为“ txt”,然后将其转换为动画片段。

2. Give the movie clip an instance name of "a1".

2.为影片剪辑指定实例名称“ a1”。

1065_tool1

3. Create a new movieclip and give it an instance name of "a0".

3.创建一个新的动画片段,并为其指定实例名称“ a0”。

4. Create layers as shown below.

4.创建如下所示的图层。

1082_tool2

5. In the actions layer in the first key frame, insert the following action:

5.在第一个关键帧的操作层中,插入以下操作:

x = new Array();
y = new Array();  
text = "Flashcircle.com";  
// mx x value of movieclip  
mx = getProperty("/a1", _x);  
txtlength = length(text);  
/a1:txt = "F";  
//loop through to create duplicate movieclip  
for (i=2; i<=txtlength; i++)  
{  
duplicateMovieClip ("/a1", "a" add i, i);  
setProperty ("/a" add Number(i), _x, mx);  
// substring to put individual letter into movieclip  
set ("/a" add Number(i) add ":txt", substring(text, i, 1));  
}

6. In the actions layer in the third key frame, insert these actions:

6.在第三个关键帧的操作层中,插入以下操作:

//code to make the text follow
for(i=1; i<=txtlength; i++)  
{  
x[i] = getProperty("/a" add Number(i-1),_x);  
y[i] = getProperty("/a" add Number(i-1),_y);  
x[i] = x[i]+10;  
}

7. In the actions layer in the fourth key frame, insert the following:

7.在第四个关键帧的操作层中,插入以下内容:

//code to make the text follow
for (i=1; i<=txtlength; i++)  
{  
setProperty ("/a" add i, _x, x[i]);  
setProperty ("/a" add i, _y, y[i]);  
}  
gotoAndPlay (2);

8. Right click the "a0" instance movie clip, and insert these actions:

8.右键单击“ a0”实例影片剪辑,然后插入以下操作:

onClipEvent (load)
{  
startDrag ("", true);  
}

9. Easy, wasn’t it? Press ctrl+enter to test you movie.

9.很简单,不是吗? 按ctrl + enter测试您的电影。

翻译自: https://www.sitepoint.com/cursor-responsive-text/

vim 光标上移脚本

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值