fileId2 = "0"; fileId3 = "0"; fileId4 = "0"; fileId5 = "0"; fileId6 = "0"; fileId7 = "0"; fileId8 = "0"; fileId9 = "0"; fileId10 = "0"; stop();
注释:上面这些变量都是为了保存从服务器端返回的Id号而设置的。
2、在第二帧的场景中用文本框工具拉十个文本框,类型都设置为“Input Type”,变量var分别设置为“title1”、“title2”、“title3”、“title4”、“title5”、“title6”、“title7”、“title8”、“title9”、“title10”。
3、在第二帧的场景中增加一个显示为“更新”Button,用来更新主题,在此Button的Action Script面板上增加如下语句:
on(release){ titleXml = new XML(); // 注释1 titleElement = titleXml.createElement("TITLE"); // 注释2 loginElement.appendChild(titleElement); // 注释3 titleXml.appendChild(titleElement);
titleRepley = new XML(); // 注释4 titleRepley.onLoad = onTitleReply; // 注释5 function onTitleReply (titlesuccess) { if (titlesuccess) { // 注释6 _root.title1 = titleRepley.firstChild.attributes.title1; // 注释7 _root.title2 = titleRepley.firstChild.attributes.title2; _root.title3 = titleRepley.firstChild.attributes.title3; _root.title4 = titleRepley.firstChild.attributes.title4; _root.title5 = titleRepley.firstChild.attributes.title5; _root.title6 = titleRepley.firstChild.attributes.title6; _root.title7 = titleRepley.firstChild.attributes.title7; _root.title8 = titleRepley.firstChild.attributes.title8; _root.title9 = titleRepley.firstChild.attributes.title9; _root.title10 = titleRepley.firstChild.attributes.title10; _root.fileId1 = titleRepley.firstChild.attributes.id1; //注释8 _root.fileId2 = titleRepley.firstChild.attributes.id2; _root.fileId3 = titleRepley.firstChild.attributes.id3; _root.fileId4 = titleRepley.firstChild.attributes.id4; _root.fileId5 = titleRepley.firstChild.attributes.id5; _root.fileId6 = titleRepley.firstChild.attributes.id6; _root.fileId7 = titleRepley.firstChild.attributes.id7; _root.fileId8 = titleRepley.firstChild.attributes.id8; _root.fileId9 = titleRepley.firstChild.attributes.id9; _root.fileId10 = titleRepley.firstChild.attributes.id10; } } titleXml.sendAndLoad("http://localhost/xmlbbs/title.asp", titleRepley); // 注释9 }
注释1:创建一个用来发送的XML对象。 注释2:创建TITLE结点对象。 注释3:将TITLE结点对象添加到XML对象中。 注释4:创建一个响应的XML对象。 注释5:设置响应XML对象的onLoad函数。 注释6:titlesuccess标示是否从服务器端返回来的XML对象。 注释7:将返回的标题属性显示在场景的文本框中。 注释8:将返回的Id号保存在场景的变量中。 注释9:利用sendAndLoad()函数,将Flash端的XML对象发送到服务器端,并接收从服务器端返回的XML对象。 ·PS相片处理实例 芙蓉姐姐大变身 ·可爱QQ动态表情制作实例剖析 ·第15章 摇盖式包装实例(上) ·PS实例:MM直发变为流行卷发的方法 ·静态路由与动态路由的概念及实例说明 ·Phototshop绘制简单商业包装实例 ·PS彩妆实例:美女烟熏妆 ·UML业务建模实例分析 ·教程实例用VRay创建冰钻石材质 ·实用 按键精灵傻瓜应用实例3则
C、Asp端
新建一个Asp文件,命名为title.asp,输入如下的内容:
<% Set MyFileObject = Server.CreateObject("Scripting.FileSystemObject") ‘ 注释1 Set MyTextFile = MyFileObject.CreateTextFile("G:\写作\flashxmlbbs\login.xml", 8, TRUE) MyTextFile.WriteLine(Request.Form) ‘ 注释2
set objDom = server.CreateObject("microsoft.xmldom") ‘ 注释3 objDom.loadxml(Request.Form) ‘ 注释4 set objname = objdom.documentElement.SelectSingleNode("//TITLE") ‘ 注释5
'判断
上一篇:Cool!Flash制作炫丽的图片特效
下一篇:Flash制作马赛克效果
|