快速业务通道

flash动态读取xml数据来实现评论功能

作者 佚名技术 来源 服务器技术 浏览 发布时间 2012-07-12
is the node
if (this.firstChild.nodeName.toLowerCase() != "comment_list") {
trace("First node wasn''t the expect node.");
return;
}
//trace(comment_listNode.length);
for(i=0;i if(comment_listNode[i].nodeName == "page_info"){
get_page_info(comment_listNode[i].childNodes);
}
if(comment_listNode[i].nodeName == "comment_info"){
get_comment_info(comment_listNode[i].childNodes);
}
}
};
//set function
function getInfo (mc, elementsArray){
assoc = new Object();//create a new object which associate the commentArray and templateMC
for(e=0;e
if (elementsArray[e].name == "titles") {
assoc.titles = {ref:elementsArray[e].obj, dist:elementsArray[i].distance};
}else if(elementsArray[e].name == "titleBG"){
assoc.titleBG = {ref:elementsArray[e].obj, dist:elementsArray[i].distance};
}else if(elementsArray[e].name == "contentOfMask"){
assoc.contentOfMask = {ref:elementsArray[e].obj, dist:elementsArray[i].distance};
}else if(elementsArray[e].name == "contents"){
assoc.contents = {ref:elementsArray[e].obj, dist:elementsArray[i].distance};
}else if(elementsArray[e].name == "contentBG"){
assoc.contentBG = {ref:elementsArray[e].obj, dist:elementsArray[i].distance};
}else if(elementsArray[e].name == "arrows"){
assoc.arrows = {ref:elementsArray[e].obj, dist:elementsArray[i].distance};
}else if(elementsArray[e].name == "authorip"){
assoc.authorip = {ref:elementsArray[e].obj, dist:elementsArray[i].distance};
}else if(elementsArray[e].name == "sep"){
assoc.sep = {ref:elementsArray[e].obj, dist:elementsArray[i].distance};
}else if(elementsArray[e].name == "infoBG"){
assoc.infoBG = {ref:elementsArray[e].obj, dist:elementsArray[i].distance};
}else if(elementsArray[e].name == "templateBG"){
assoc.templateBG = {ref:elementsArray[e].obj, dist:elementsArray[i].distance};
}else{
trace("else");
}
}
counterArray[id]= 0; //set for the looptitles function so that they know the started point
counterMC[id]= 0;//set for the show content
//get titles value
// assoc.titles.ref.text = commentArray[id].comment_title;
loopTitles[id] = setInterval(showTxt,60,assoc.titles.ref,commentArray[id].comment_title,id);
trace("counterArray "+id+"is"+counterArray[id]);
//trace(loopTitles[id]);
assoc.titles.ref.autoSize = "left";;
//set titleBG height and y
//set contets value
assoc.contents.ref.text = commentArray[id].comment_content;
assoc.contents.ref.autoSize = "left";
assoc.contents.ref.wordWrap = true;
assoc.contents.ref.multiline = true;
//set assoc.contentOfMask height
//assoc.contentOfMask.ref._y = assoc.contents.ref._y;
assoc.contentOfMask.ref._height = assoc.contents.ref._height;
//get contentBG height and y
assoc.contentBG.ref._height = assoc.contents.ref._height + 8;
//get the sep y
assoc.sep.ref._y = assoc.contentBG.ref._y + assoc.contentBG.ref._height;
//get the arrow y
assoc.arrows.ref._y = assoc.sep.ref._y + 8;
//get the authorip y
assoc.authorip.ref._y = assoc.arrows.ref._y -2;
assoc.authorip.ref.text = "作者: " + co

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号