以下是Flash Actionscript语句:
function showPic()
{
nav = proXml.firstChild.childNodes;
spicWidth = int(proXml.firstChild.attributes.spic_Width);
spicHeight = int(proXml.firstChild.attributes.spic_Height);
lpicWidth = int(proXml.firstChild.attributes.lpic_Width);
lpicHeight = int(proXml.firstChild.attributes.lpic_Height);
rowNumber = int(proXml.firstChild.attributes.row_Number);
pageNumber = int(proXml.firstChild.attributes.page_Number);
cellNumber = int((sceneWidth - lpicWidth - spicWidth * rowNumber) / (rowNumber + 2));
picCell = cellNumber + spicWidth;
lpicPos = sceneWidth - cellNumber - lpicWidth;
spic_rowCell = (sceneHeight - lpicHeight) / (int(pageNumber / rowNumber) + 1);
_root.content.pro.mask._x = lpicPos;
_root.content.pro.mask._y = (sceneHeight - lpicHeight) / 2;
_root.content.pro.mask._width = lpicWidth;
_root.content.pro.mask._height = lpicHeight;
count = 0;
navlen = nav.length;
totalPage = nav[navlen - 1].firstChild.nodeValue;
jjfg = nav[navlen - 2].firstChild.nodeValue;
createEmptyMovieClip("slide", 10);
for (i = 0; i < pageNumber / rowNumber; i++)
{
_root.content.pro.createEmptyMovieClip("mc" add i, i);
mc = eval("mc" add i);
mc._y = (sceneHeight - lpicHeight) / 2 + i * (spicHeight + spic_rowCell) + 35;
for (j = 0; j < rowNumber; j++)
{
mc.attachMovie("pic", "newPic", 1);
mc = mc.newPic;
if (j == 0)
{
mc._x = cellNumber;
}
else
{
mc._x = picCell;
} // end else if
mc.smallPic = nav[count].attributes.smallPic;
mc.bigPic = nav[count].attributes.bigPic;
++count;
mc.pic.loadMovie(mc.smallPic);
mc.bt.onRelease = function ()
{
var _loc1 = _root;
a = 1;
++count;
_loc1.content.pro.slide.createEmptyMovieClip("CM" + count, count);
_loc1.content.pro.slide["CM" + count].loadMovie(this._parent.bigPic);
_loc1.content.pro.slide["CM" + count]._x = sceneWidth;
_loc1.content.pro.slide["CM" + count]._y = (sceneHeight - lpicHeight) / 2;
_loc1.content.pro.slide["CM" + count]._alpha = 0;
_loc1.content.pro.onEnterFrame = function ()
{
var _loc1 = _root;
++a;
_loc1.content.pro.slide.setMask(mask);
_loc1.content.pro.slide["CM" + count]._alpha = _loc1.content.pro.slide["CM" + count]._alpha + 5;
_loc1.content.pro.slide["CM" + count]._x = _loc1.content.pro.slide["CM" + count]._x + (lpicPos - _loc1.content.pro.slide["CM" + count]._x) / 5;
_loc1.content.pro.slide["CM" + (count - 1)]._x = _loc1.content.pro.slide["CM" + (count - 1)]._x - a * 3;
_loc1.content.pro.slide["CM" + (count - 2)].removeMovieClip();
};
};
} // end of for
} // end of for
_root.content.pro.slide.createEmptyMovieClip("CM" + count, count);
_root.content.pro.slide["CM" + count].loadMovie(nav[0].attributes.bigPic);
_root.content.pro.slide["CM" + count]._x = sceneWidth;
_root.content.pro.slide["CM" + count]._y = (sceneHeight - lpicHeight) / 2;
_root.content.pro.slide["CM" + count]._alpha = 0;
_root.content.pro.onEnterFrame = function ()
{
if (_root.content.pro.currentPage <= 1)
{
_root.content.pro.currentPage = 1;
} // end if
_root.content.pro.slide.setMask(mask);
_root.content.pro.slide["CM" + count]._x = _root.content.pro.slide["CM" + count]._x + (lpicPos - _root.content.pro.slide["CM" + count]._x) / 5;
_root.content.pro.slide["CM" + count]._alpha = _root.content.pro.slide["CM" + count]._alpha + 5;
currentPag = eval("_root.content.pro.pageMc.newpage" + _root.content.pro.currentPage);
currentPag.pageNo.textColor = 10027008;
_root.content.pro.jjfg = jjfg;
};
_root.content.pro.createEmptyMovieClip("pageMc", 12);
pageMc = pageMc;
pageMc._y = (sceneHeight - lpicHeight) / 2 + pageNumber / rowNumber * (spicHeight + spic_rowCell) + 15;
pageMc._x = cellNumber + 5;
for (i = 1; i <= totalPage; i++)
{
pageMc.attachMovie("page", "newpage" + i, i);
theBt = eval("pageMc.newpage" + i);
theBt.page = i;
theBt._x = i * 20;
theBt.onRollOver = function ()
{
this.pageNo.textColor = 10027008;
};
theBt.onRollOut = function ()
{
this.pageNo.textColor = 0;
};
theBt.onPress = function ()
{
_root.content.pro.currentPage = this.page;
_root.content.pro.gotoAndPlay(1);
};
} // end of for
} // End of the function
fscommand("showmenu", "false");
System.useCodepage = true;
proXml = new XML();
proXml.ignoreWhite = true;
proXml.load("images/pro.asp?pId=" + _root.content.pro.pId + "&page="+ _root.content.pro.currentPage);
var sceneWidth = 708;
var sceneHeight = 415;
_root.content.pro.content.pro.loading._x = sceneWidth / 2;
_root.content.pro.loading._y = sceneHeight / 2;
proXml.onLoad = function (success)
{
if (success)
{
gotoAndPlay("showpic");
}
else
{
gotoAndPlay("loading");
} // end else if
};
调试时的错误是 Error opening URL " file:///C|/Documents%20and%20Settings/Administrator/桌面/images/pro.asp?pId=&page="
就是获取不到&page的值!路径都是正确的!ASP文件是XML。那位高手帮我看看以上Actionscript语法有没有问题!谢谢