谁能帮我翻译以下的flash动作脚本?

来源:百度知道 编辑:UC知道 时间:2024/05/21 21:50:39
if (isLoaded == undefined)
{
var updateFrame = function (inc)
{
var _loc2 = _currentframe + inc;
gotoAndStop(_loc2);
if (_root._currentframe == 1)
{
backBtn._alpha = 50;
backBtn.enabled = false;
}
else
{
backBtn._alpha = 100;
backBtn.enabled = true;
} // end else if
if (_root._currentframe == _root._totalframes)
{
forwardBtn._alpha = 50;
forwardBtn.enabled = false;
}
else
{
forwardBtn._alpha = 100;
forwardBtn.enabled = true;
} // end else if
};
forwardBtn.onPress = function ()
{
updateFrame(1);
};
backBtn.onPress = function ()
{
updateFrame(-1);
};
var ke

if (isLoaded == undefined) //如果变量isLoaded的值为undefined(即为未定义)时执行括号里面的语句。
{
var updateFrame = function (inc) //定义一函数updateFrame
{
var _loc2 = _currentframe + inc; //将变量_loc2的值设为当前影片帧编号加上变量inc
gotoAndStop(_loc2); //跳转到_loc2变量记录的帧编号
if (_root._currentframe == 1) //如果当前帧编号为1
{
backBtn._alpha = 50; //将backBtn(我猜是返回按钮)对象的透明度设置为50
backBtn.enabled = false; //将backBtn设置为非激活状态
}
else //否则
{
backBtn._alpha = 100; //backBtn对象的透明度为100,即不透明
backBtn.enabled = true; //backBtn为激活状态
} // end else if
if (_root._currentframe == _root._totalframes) //如果当前处于影片的最后一帧
{
forwardBtn._alpha = 50; //则将forwardBtn(向前的按钮)对象透明度设置为50
forwardBtn.enabled = false; //将forwardBtn设置为非激活状态
}
else //否则
{
forwardBtn._alpha = 100; //forwardBtn的透明度为100
forwardBtn.enabled = true; //forwardBtn为激活状态
} // end else if
};//函数定义结束
forwardBtn.onPress = function () //设置forwardBtn的按下事件
{