// 下階層用テンプレート #topicpath ---- #contents **デバッグの為のダイアログ [#u4464789] mx.controls.Alert.show('デバッグ文', 'メッセージ'); **DataGridの選択しているオブジェクトを取得する。 [#i7382288] 別途hogeItem変数は定義しておきます。 <mx:DataGrid id="list" width="100%" height="100%" dataProvider="{dataObject}" change="hogeItem=event.target.selectedItem"> <mx:columns> <mx:Array> <mx:DataGridColumn headerText="Name" columnName="name" width="300"/> <mx:DataGridColumn headerText="Price" columnName="price" textAlign="right" marginRight="4"/> </mx:Array> </mx:columns> </mx:DataGrid> <mx:Label text="{hogeItem.name}" /> グリッド内で行を選択するとchangeイベントが発生するので、 event.target.selectedItem プロパティで選択しているオブジェクトを取得できます。 ** TileListで選択しているオブジェクトを取得する。 [#s732ae69] <mx:TileList id="myTile" dataProvider="{dataObject}" height="100%" width="100%" itemHeight="116" itemWidth="120" cellRenderer="ProductThumbnail" borderStyle="none" change="selectedItem=dataObject[myTile.selectedIndex];"> ↑選択している場所(selectedIndex)を使って配列からオブジェクトを取得する。 </mx:TileList> ---- この記事は #vote(おもしろかった[9],そうでもない[4]) - デバッグだけなら、trace()使うと簡単ですよ。Flash Playerがデバッグ版である必要がありますが、Flex Builderを入れると自動で入るはず。 -- &new{2007-11-06 (火) 17:30:28}; #comment #topicpath SIZE(10){現在のアクセス:&counter;}