永发信息网

Flash Actionscript语句错误问题

答案:2  悬赏:80  手机版
解决时间 2021-04-22 21:07

以下是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语法有没有问题!谢谢

最佳答案
你好,请尝试一下用浏览器来打开这个Flash文件.因为我看见你加载的时候是直接附带参数来加载的,Windows的资源管理器里不支持这样加载.还是尝试一下吧!
全部回答
你好 我看了一下 你在proXml.ignoreWhite = true; 这一句后面加上_root.content.pro.currentPage =1;然后试一下
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
王钢口腔诊所地址有知道的么?有点事想过去
预示明天天气好的谚语,预示明天天气好,预示将
我要写一篇描写月光的散文,用什么题目好?
我们通常说的流量一兆大概等于多少KB呀?
vray渲染器不注册不能用吗
从成都茶店子公交站到世纪城国际会展中心打的
歌词中有永永远远的歌曲叫什么?和《留在我身
从西安到临潼有多远
不是直系情属烧伤后是不是可以植皮肤
我家的电脑农场打不开怎麽办呀?请前辈指教 谢
四平市万邦建筑工程有限公司地址在哪,我要去
三星的酷毕手机号还是联想的i60好呢?
套改工资是什么意思,薪级工资是什么意思,201
远方英文单词怎么写
现在女孩的话还能信吗?
推荐资讯
流星是什么样?
农民工搞笑新一代视频的那首歌叫什么名字?
请问怎么开罐子
儒房地产营销策划公司在什么地方啊,我要过去
金鱼缸里一夜之间突然出现了一堆白色小球是什
急,急,急我儿子是喝药的原因,还是消化不良:我
白度空间在哪可以找到,怎么老找不到
怎么样才能把学习成绩提高上去
我的q宠病了我没元宝了怎么办
怎么我登陆DNF总是读取中的状态
地下城狂战刷图怎么样
dota 里 猴子(幻影长矛手)怎么出装 包括出
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?