mxmlアプリケーションに2つのタイルリストがあります。アイテム(画像とラベル)は、アイテムレンダラーによってレンダリングされます。私が達成したい機能:タイルリスト#1から画像をドラッグし、タイルリスト#2にドロップします(その後、SQLクエリを使用したhttpserviceが起動します)。
この問題にどのように対処しますか?(高レベルの情報で十分です)。私が抱えている主な問題は、メインからアイテムレンダラーにメソッドを呼び出す方法がわからないことです。レンダラー内でd&d機能をコーディングしたいのですが、レンダラー内からウォッチリスト#2にアクセスする方法がわかりません。main.mxmlの関連コード:
<s:Panel id="panel" width="100%" height="100%" title="Watchlist">
<s:layout>
<s:VerticalLayout paddingBottom="5" paddingLeft="20"
paddingRight="20" paddingTop="5"/>
</s:layout>
<s:Label width="20%" fontSize="17" fontWeight="bold" text="Your watched movies"/>
<mx:TileList id="myWatchedList_tile" height="360" borderVisible="false" width="80%"
columnCount="5" columnWidth="200"
itemRenderer="components.TileListItemRenderer" rowCount="1" rowHeight="360"/>
<s:Label width="20%" fontSize="17" fontWeight="bold" text="Your to watch movies"/>
<mx:TileList id="myToWatchList_tile" height="360" borderVisible="false" width="80%"
columnCount="5" columnWidth="200"
itemRenderer="components.TileListItemRenderer" rowCount="1" rowHeight="360" />
</s:Panel>
itemrenderer:
<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
borderVisible="false" horizontalAlign="center" verticalAlign="middle"
xmlns:components="components.*">
<mx:Image source="{data.poster_url}" />
<mx:Label text="{data.movie_title}" height="20" />
</mx:VBox>