officeba > 单独文章


Zinemaker中滚动文本框的制作方法

讲解下
动作代码:
var move_it = false;
var dir = 1;
var speed = 2;
var scale = 3;
var max1 = move_mc._y;
var min1 = mask_mc._y - move_mc._height + mask_mc._height;
up_btn.onRollOver = function ()
{
move_it = true;
dir = 1;
};
up_btn.onRollOut = function ()
{
move_it = false;
};
up_btn.onPress = function ()
{
speed = speed * scale;
};
up_btn.onRelease = function ()
{
speed = speed / scale;
};
up_btn.onReleaseOutside = function ()
{
speed = speed / scale;
move_it = false;
};
down_btn.onRollOver = function ()
{
move_it = true;
dir = -1;
};
down_btn.onRollOut = function ()
{
move_it = false;
};
down_btn.onPress = function ()
{
speed = speed * scale;
};
down_btn.onRelease = function ()
{
speed = speed / scale;
};
down_btn.onReleaseOutside = function ()
{
speed = speed / scale;
move_it = false;
};
move_mc.onEnterFrame = function ()
{
if (move_it)
{
if (this._y + dir * speed > max1)
{
this._y = max1;
}
else if (this._y + dir * speed < min1)
{
this._y = min1;
}
else
{
this._y = this._y + dir * speed;
} // end if
} // end if
}; 定义一个叫move_mc的文本动画,就是上下移动的文本主题 可以用图片也可以是type,加个遮照层效果更好
up_btn和down_btn是定义向上和向下的按钮名称

声明:欢迎各大网站转载本站文章,还请保留一条能直接指向本站的超级链接,谢谢!

时间:2007-05-15 09:16:23,点击:65824


【OfficeBa论坛】:阅读本文时遇到了什么问题,可以到论坛进行交流!Excel专家邮件:342327115@qq.com(大家在Excel使用中遇到什么问题,可以咨询此邮箱)。

【声明】:以上文章或资料除注明为Office自创或编辑整理外,均为各方收集或网友推荐所得。其中摘录的内容以共享、研究为目的,不存在任何商业考虑。如有任何异议,请与本站联系,本站确认后将立即撤下。谢谢您的支持与理解!


相关评论

我要评论

评论内容