作者chigayaptt (牧枫蝶)
看板Flash
标题Re: [问题] 随滑鼠移动的跑马灯?
时间Tue Nov 7 21:04:20 2006
※ 引述《turgo (这一切都是个谜)》之铭言:
: 我想做像此网页下方FLASH的效果
: http://gtasia.com.tw/specialist.html
: 我太笨了~想不出来 是将每一个物件设成按钮吗?
: 要用Action Scrip?怎麽写?
: 紧急求救!!
: 可以将我所有的P币提供给详细解答的人
: (不过要教我怎麽给)
: 感激不尽~
原始码
把按钮影片命名成strip,就是存成同一个按钮长条那个
然後拉到场景上 ,点选f9之後把这段贴上就好了
onClipEvent (load) {
percent_increment = .08;
addstrip2 = false;
}
onClipEvent (enterFrame) {
this._x += (_root._xmouse-320)*percent_increment;
if (this._x<=0 && this._x>=-this._width) {
if (addstrip2 == false) {
this.duplicateMovieClip("strip2", 1);
addstrip = true;
}
_root.strip2._x = this._x+this._width-1;
_root.strip2._y = this._y;
}
if (this._x<=-this._width) {
this._x = _root.strip2._x+this._width-1;
}
if (this._x>0 && this._x<this._width) {
if (addstrip2 == false) {
this.duplicateMovieClip("strip2", 1);
addstrip = true;
}
_root.strip2._x = this._x-this._width+1;
_root.strip2._y = this._y;
}
if (this._x>=this._width) {
this._x = _root.strip2._x-this._width+1;
}
}
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.140.176.184
1F:→ chigayaptt:忘了说 这是我在场景宽550时用的 11/07 21:04
2F:推 turgo:非常非常感谢你 请问要怎麽样把P币给你勒? 11/07 22:09
3F:推 chigayaptt:有没有都没差^^|| 我只是随自已高兴而回答 有无皆可 11/07 22:10
4F:推 turgo:你..要我颁赠好人卡吗? 嘿~:) 11/11 22:06