Zinemaker2006中的flash应用技术
时间:2007-06-20 18:32:23
作者: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是定义向上和向下的按钮名称