<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="Init()"> <mx:Script source="utils.as"/> <mx:Script> <!--[CDATA[ import flash.net.navigateToURL; [Bindable] private var dataProvider:Array = null; private function Init():void { dataProvider = [{url0:'http://www.sina.com',url1:'http://www.sohu.com'}]; } public function BtnClick(obj:Object):void { flash.net.navigateToURL(new URLRequest(obj.url1), "_self"); } ]]> </mx:Script> <mx:DataGrid name="grid" dataProvider="{dataProvider}" width="426"> <mx:columns> <mx:DataGridColumn headerText="URL" > <mx:itemRenderer> <mx:Component> <mx:HBox> <mx:Label text="CLICK"/> <mx:LinkButton click="BtnClick()" label="LINK0"> <mx:Script> <![CDATA[ import flash.net.navigateToURL; private function BtnClick():void { data; flash.net.navigateToURL(new URLRequest(data.url0), "_self"); } ]]--> </mx:Script> </mx:LinkButton> <mx:LinkButton click="outerDocument.BtnClick(data)" label="LINK1" /> </mx:HBox> </mx:Component> </mx:itemRenderer> </mx:DataGridColumn> </mx:columns> </mx:DataGrid> </mx:Application>