| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 3340 人关注过本帖
标题:[求助][求助]XML和FLASH的连接,会的请一定要帮帮我啊
只看楼主 加入收藏
zhaoqiao
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2005-5-28
收藏
 问题点数:0 回复次数:2 
[求助][求助]XML和FLASH的连接,会的请一定要帮帮我啊

<lists> <list category="WORDSONE"> <word>SHOW</word> <word>WHICH</word> <word>EVERYTHING</word> <word>LOVE</word> <word>ROUND</word> <word>STRONG</word> <word>DUCK</word> <word>SKIN</word> </list> </lists>

连接的内容是:

doc = new XML(); doc.ignoreWhite = true; doc.load("wordlists.xml");

接着是分配

function myHandler() { playButton._alpha = 100; playButton.enable = true; var _l1 = scrollList.getSelectedItem().data; words.words = words.lists[_l1].wordList; words.category = scrollList.getSelectedItem().label; } // End of the function function init() { var temp = []; var temp = doc.firstChild.childNodes; scrollingList = []; var _l2 = 0; while (_l2<temp.length) { var tempList = temp[_l2].childNodes; var category = temp[_l2].attributes.category; var wordArray = []; var _l1 = 0; while (_l1<tempList.length) { var _l3 = tempList[_l1].firstChild.nodeValue; wordArray.push(_l3); _l1++; } // end while words.lists.push({wordList:wordArray, category:category}); scrollingList.push({label:category, data:_l2}); _l2++; } // end while scrollList.setDataProvider(scrollingList); scrollList.setChangeHandler("myHandler"); } // End of the function words = {}; words.lists = []; playButton._alpha = 50; init();

搜索更多相关主题的帖子: word XML FLASH doc lists 
2005-05-28 10:44
zhaoqiao
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2005-5-28
收藏
得分:0 
帮帮我啊,会的,请联系我QQ9603220
2005-05-28 13:13
zhaoqiao
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2005-5-28
收藏
得分:0 
help....会的请帮帮我
2005-05-28 14:21
快速回复:[求助][求助]XML和FLASH的连接,会的请一定要帮帮我啊
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.043092 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved