I recently launched a private activity, and I need to use as to load the xml of a website. However, I am not a good user of as. I just want to see how to play it. It is quite simple after reading it. For business complexity, let's just give a small example. Most of the time, to make the page area more flexible, vivid, and attractive, flash should be used more or less. If flash cannot be exchanged with the outside world, the flash function will be greatly limited, this is no fun. on many websites, we can see that flash is used to display the current number of online users, flash is used to show the number of current user participants, or the current winning list is displayed in a rolling manner. Because it is purely teaching, the business is very simple, and the number of current user participation is dynamically displayed. However, the good thing is that after many programs get a benchmark, they no longer turn to the server for training, instead, random numbers are used in flash to simulate the dynamic increase and decrease, which is used to cheat participants... I. the xml file is simple. Only one benchmark participant is placed: <? Xml version = "1.0" encoding = "UTF-8"?> <Project> <joins> <nums> 20 </nums> </joins> </project> 2: Request the xml as code import flash.net on the web. URLLoader; import flash.net. URLRequest; import flash. events. event; import flash. text. textField; import flash. utils. timer; import flash. events. timerEvent; var myxml: XML; // request xmlvar url on the web =" http://localhost:25212/test.xml "; Var req: URLRequest = new URLRequest (url); var loader: URLLoader = new URLLoader (req); var lab: TextField = new TextField (); var timer: timer = new Timer (1000); var joinScale: int loader. addEventListener (Event. COMPLETE, onComplete); function onComplete (e: Event): void {myxml = new XML (loader. data); joinScale = myxml. joins. nums var output = "current number of participants:" + joinScale trace (output); lab. text = output lab. width = 200; lab. x = 100; lab. y = 100; addChild (lab); timer. addEventListener (TimerEvent. TIMER, setText); timer. start ();} function setText (e: TimerEvent) {// reduce joinScale = joinScale + (10 * Math. random ()-3 lab. text = "currently involved:" + joinScale}