import flash.html.HTMLLoader;import flash.net.URLLoader;import flash.net.URLRequest;import flash.events.MouseEvent;var qqIcon:Loader = new Loader();qqIcon.contentLoaderInfo.addEventListener(Event.COMPLETE,onLodrEnd);qqIcon.load(new URLRequest("http://wpa.qq.com/pa?p=1:879255681:7"));//"http://wpa.qq.com/pa?p=2:" + qq + ":41?" + Math.random(); qqIcon.addEventListener(MouseEvent.CLICK,onQQIConClick);qqIcon.addEventListener(MouseEvent.MOUSE_OVER,onQQIConOver);qqIcon.addEventListener(MouseEvent.MOUSE_OUT,onQQIConOut);function onLodrEnd(event:Event):void{this.addChild(qqIcon);} function onQQIConClick(event:MouseEvent):void{ //navigateToURL(new URLRequest("tencent://message/?Menu=yes"));//没登录会打开登录窗口 navigateToURL(new URLRequest("http://wpa.qq.com/msgrd?v=3&uin=" + 879255681 + "&site=qq&menu=yes"));//qq如果登录,会打开好友879255681号码的窗口,没登录会打开登录窗口 }function onQQIConOver(e:MouseEvent):void{ Mouse.cursor=MouseCursor.BUTTON; }function onQQIConOut(e:MouseEvent):void{ Mouse.cursor=MouseCursor.ARROW; }