请教flash代码翻译!

下面的代码谁能帮我翻译呢!谢谢!(我回答的那一篇代码,字数太多,不允许)
最新回答
咱狠自私

2024-09-18 10:12:06

on (press) {
_root.scroller.scroller.gotoAndStop(3);
startDrag("", false, 0, -35, 0, 198);
}
按钮被按下时 舞台上有个叫scroller的影片剪辑 他上面还有一个也叫scroller的影片剪辑 跳转到第三帧(自己双击scroller 然后再双击 就可以看到_root.scroller.scroller的时间轴 自己看看第三帧是什么吧) startDrag是指变成了拖动状态 (浮起来了)

on (release, releaseOutside) { //鼠标释放时 触发一下代码
_root.scroller.scroller.gotoAndStop(3);//跳到第三帧 停下
stopDrag();//结束拖动状态
if (_root.page1.scrolledMCrecipient._y<100) { //一个叫scrolledMCrecipient的影片剪辑的Y值 小于100
_root.page1.scrolledMCrecipient._y = -25; //让他的Y值变成-25
gotoAndPlay("t1"); //跳转到一个命名为 t1的帧
} else if (_root.page1.scrolledMCrecipient._y>101) { //Y值大于101
if (_root.link<>1) { //<>1?没看懂 link应该是一个变量吧
_root["page"+_root.link].scrolledMCrecipient._y = -25;//["page"+_root.link]是控制哪一个影片剪辑 具体是什么 这里看不出 然后改变Y值
_root["page"+_root.link].scrolledMCrecipient.GotoAndPlay("t1");//跳转到名字t1 然后播放
_root.link = 1;//不解释..
}
_root.page1.scrolledMCrecipient._y = 198;
gotoAndPlay("t2");
}
}

这些as2脚本 老实说as2的变量 都没声明 所以单单贴代码 不知道里面的变量时什么 不怎么好解释~
听风入韵

2024-09-18 07:36:19

function fadeTPl_1(co, no)
{
currPicObj = co;
nextPicObj = no;
fadingLoop = setInterval(function ()
{
if (nextPicObj._alpha >= 100 && currentPic._alpha <= 0)
{
clearInterval(fadingLoop);
currentPic = nextPic;
isFading = false;
return(undefined);
} // end if
currPicObj._alpha = currPicObj._alpha - 10;
nextPicObj._alpha = nextPicObj._alpha + 10;
}, 50);
} // End of the function
function getData()
{
var xmlObj = new XML();
xmlObj.load("xml/xml.xml");
xmlObj.ignoreWhite = true;
xmlObj.onLoad = function (success)
{
fixData(xmlObj);
};
} // End of the function
function fixData(o)
{
var _l1 = 0;
while (_l1 < o.firstChild.childNodes.length)
{
preLoadPic(_l1, o.firstChild.childNodes[_l1].childNodes[2].firstChild);
arrUrl.push(o.firstChild.childNodes[_l1].childNodes[1].firstChild);
arrTitle.push(o.firstChild.childNodes[_l1].childNodes[0].firstChild);
_l1++;
} // end while
linkbutton.onRelease = function ()
{
getURL(arrUrl[0], "_blank");
};
btn1_mc.gotoAndStop(2);
} // End of the function
function preLoadPic(i, u)
{
i++;
eval("img" + i + "_mc").loadMovie(u);
checkPicLoad(i, eval("img" + i + "_mc"));
} // End of the function
function checkPicLoad(i, o)
{
o.onEnterFrame = function ()
{
if (int(o.getBytesLoaded() / o.getBytesTotal() * 100) >= 100)
{
eval("btn" + i + "_mc")._visible = true;
delete o["onEnterFrame"];
} // end if
};
} // End of the function
function start()
{
getData();
} // End of the function
function checkFade()
{
var i = 1;
while (i < 8)
{
if (eval("btn" + i + "_mc")._visible == false)
{
return(undefined);
} // end if
i++;
} // end while
clearInterval(picLoadLoop);
startFade();
} // End of the function
function startFade()
{
playerPlay();
} // End of the function
function picFade()
{
nextPic = currentPic == 7 ? (1) : (parseInt(currentPic) + 1);
loadFadeTpl(eval("img" + currentPic + "_mc"), eval("img" + nextPic + "_mc"));
} // End of the function
function loadFadeTpl(co, no)
{
isFading = true;
linkbutton.onRelease = function ()
{
getURL(arrUrl[nextPic - 1], "_blank");
};
setButtonColor();
fadeTPl_1(co, no);
} // End of the function
function setButtonColor()
{
var i = 1;
while (i < 8)
{
eval("btn" + i + "_mc").gotoAndStop(1);
i++;
} // end while
eval("btn" + nextPic + "_mc").gotoAndStop(2);
} // End of the function
function setCurrPic(cp)
{
if (currentPic == cp)
{
return(undefined);
} // end if
if (isFading == false)
{
playerStop();
nextPic = cp;
loadFadeTpl(eval("img" + currentPic + "_mc"), eval("img" + nextPic + "_mc"));
}
else
{
trace(isFading);
} // end if
} // End of the function
function playPrePic()
{
playerStop();
nextPic = currentPic == 1 ? (7) : (parseInt(currentPic) - 1);
loadFadeTpl(eval("img" + currentPic + "_mc"), eval("img" + nextPic + "_mc"));
} // End of the function
function playNextPic()
{
playerStop();
picFade();
} // End of the function
function playerStop()
{
_root.player_mc.gotoAndStop(1);
clearInterval(fadeLoop);
} // End of the function
function playerPlay()
{
_root.player_mc.gotoAndStop(2);
fadeLoop = setInterval(picFade, 4000);
} // End of the function
stop();
Stage.scaleMode = "noScale";
Stage.showMenu = false;
System.useCodepage = false;
var picLoadLoop;
var fadeLoop;
var currentPic = 1;
var nextPic;
var arrUrl = [];
var arrTitle = [];
var isFading = false;
var fadingLoop;
var currPicObj;
var nextPicObj;
picLoadLoop = setInterval(checkFade, 500);
start();

这一段,谁能帮我翻译呢!