用Macromedia Flash 8软件怎么做跟随鼠标移动的文字。

2025-03-04 19:31:26
推荐回答(1个)
回答1:

首先打开FLASH8 ,选择时间轴 F9 粘贴当前代码,CTRL+ENTER 测试下,“”内文字便是你想要的,改下即可。
aiyi_text = "满意吗,不懂问我181226233";
aiyi_len = aiyi_text.length;
n = 0;
while (n_root.createEmptyMovieClip("aiyiT"+n, n);
t = aiyi_text.substr(n, 1);
with (_root["aiyiT"+n]) {
createTextField("aiyi_t", 2, 0, 0, 20, 20);
aiyi_t.text = t;
//trace(aiyi_t.text)
}
n++;
}
startDrag(aiyiT0, true);
_root.onLoad = function() {
speed = 3;
};
_root.onEnterFrame = function() {
aiyi = 1;
while (aiyi<=_root.aiyi_len) {
_root["aiyiT"+aiyi]._x += 5+(_root["aiyiT"+(aiyi-1)]._x-_root["aiyiT"+aiyi]._x)/speed;
_root["aiyiT"+aiyi]._y += (_root["aiyiT"+(aiyi-1)]._y-_root["aiyiT"+aiyi]._y)/speed;
aiyi++;
}
};
_root.Mouse.hide();