加入城市,听原创电台,写情感文字,分享你的一切。
您需要 登录 才可以下载或查看,没有帐号?注册居民
x
一、比较保守的方法,如果要放到按钮上的效果就onRollOver,别忘了再写个onRollOut配它哦。
以下为引用的内容:
upBtn.onPress = function() { onEnterFrame = function () { textHolder.scroll += 2; }; }; upBtn.onRelease = function() { delete onEnterFrame; }; dnBtn.onPress = function() { onEnterFrame = function () { textHolder.scroll -= 2; }; }; dnBtn.onRelease = function() { delete onEnterFrame; }; |
二、
以下为引用的内容:
this.createEmptyMovieClip("a_mc", 100); this.createEmptyMovieClip("c_mc", 200); down_btn.onPress = function() { a_mc.onEnterFrame = function() { textField_txt.scroll += 1; }; }; down_btn.onRollOver = function() { a_mc.onEnterFrame = function() { textField_txt.scroll += 3; }; }; up_btn.onPress = function() { c_mc.onEnterFrame = function() { textField_txt.scroll -= 1; }; }; up_btn.onRollOver = function() { c_mc.onEnterFrame = function() { textField_txt.scroll -= 3; }; }; up_btn.onRelease = function() { delete c_mc.onEnterFrame; }; up_btn.onRollOut = function() { delete c_mc.onEnterFrame; }; down_btn.onRollOut = function() { delete a_mc.onEnterFrame; }; down_btn.onRelease = function() { delete a_mc.onEnterFrame; }; |
欢迎讨论和评价 |