package{importflash.display.Sprite;importflash.events.Event;importflash.events.MouseEvent;importflash.globalization.StringTools;importflash.net.URLRequest;importflash.net.navigateToURL;importflash.display.Bitmap;importflash.display.Loader;importflash.ui.Mouse;importflash.ui.MouseCursor;publicclassMain extendsSprite { privatevarqq:String= "278919507";privatevarloader:Loader = newLoader(); privatevarbit:Bitmap ;privatevarbox:Sprite;publicfunctionMain():void{if(stage) init();elseaddEventListener(Event.ADDED_TO_STAGE, init);}privatefunctioninit(e:Event = null):void{removeEventListener(Event.ADDED_TO_STAGE, init); box = newSprite();upData();}publicfunctionupData():void{ loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCom); varsUrl:String= "http://wpa.qq.com/pa?p=2:"+ qq + ":41?"+ Math.random();trace(sUrl); loader.load(newURLRequest(sUrl)); } privatefunctiononCom(e:Event) :void{ bit = Bitmap(loader.content); bit.height = 22;bit.width = 74; box.addChild(bit); addChild(box); box.x = box.y = 10;// Click the icon and switch the mousebox.addEventListener(MouseEvent.CLICK, onClick);box.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);box.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);} privatefunctiononClick(e:MouseEvent):void{varsUrl:String= "http://wpa.qq.com/msgrd?v=3&uin="+ qq + "&site=qq&menu=yes";navigateToURL(newURLRequest(sUrl),"_blank"); trace("test");}privatefunctiononMouseOver(e:MouseEvent):void{Mouse.cursor=MouseCursor.BUTTON; }privatefunctiononMouseOut(e:MouseEvent):void{Mouse.cursor=MouseCursor.ARROW; }}}Make a note to avoid finding Yang Guo under the bodhi tree
Source: http://yjmyzz.cnblogs.com
The copyright of this article is shared by the author and the blog Park. You are welcome to repost this article. However, you must retain this statement without the author's consent and provide a clear link to the original article on the article page. Otherwise, you will be held legally liable.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service