質問

書いて表示するコンポーネントにファイル名を、サムネイルとボタンのロ/遊びのファイルです。コンポーネント開発へのリピーター.いように、ボタンイベントの火災にメインのアプリケーションを今に伝えするファイルにあったのでしょうか。

役に立ちましたか?

解決

おカスタムコンポーネントを聞くことができ、ボタンをクリックイベントを生成するカスタムイベント開催に関する情報はしたいファイルを再生します。きの泡性をtrueのイベントや派遣のカスタムイベントからカスタム部品です。の気泡のプロパティをイベントのfloatを表示リストをごの代表的な用途となります。今回の主なアプリケーションを聴くことができるイベントの正しいファイルです。武器agiは、dexで下がらないboxerぐ.

他のヒント

っかつ)

カスタムコンポーネント

<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" x="0" y="0" width="215" height="102" styleName="leftListItemPanel" backgroundColor="#ECECEC" horizontalScrollPolicy="off" verticalScrollPolicy="off">
<mx:Script>
    <![CDATA[
        [Bindable] public var Title:String = "";
        [Bindable] public var Description:String = "";
        [Bindable] public var Icon:String = ""; 
        [Bindable] public var FileID:String = "";
        private function viewClickHandler():void{
            dispatchEvent(new Event("viewClick", true));// bubble to parent
        }
    ]]>
</mx:Script>
<mx:Metadata>
    [Event(name="viewClick", type="flash.events.Event")]
</mx:Metadata>
<mx:Label x="11" y="9" text="{String(Title)}" styleName="listItemLabel"/>
<mx:TextArea x="11" y="25" height="36" width="170" backgroundAlpha="0.0" alpha="0.0" styleName="listItemDesc" wordWrap="true" editable="false" text="{String(Description)}"/>
<mx:Button x="20" y="65" label="View" click="viewClickHandler();" styleName="listItemButton" height="22" width="60"/>
<mx:LinkButton x="106" y="68" label="Details..." styleName="listItemLink" height="18"/>
<mx:HRule x="0" y="101" width="215"/>

のリピーター

<mx:Canvas id="pnlSpotlight" label="SPOTLIGHT" height="100%" width="100%" horizontalScrollPolicy="off">
    <mx:VBox width="100%" height="80%" paddingTop="2" paddingBottom="1"  verticalGap="1">
        <mx:Repeater id="rptrSpotlight" dataProvider="{aSpotlight}">            
            <sm:SmallCourseListItem 
                viewClick="PlayFile(event.currentTarget.getRepeaterItem().fileName);"
                Description="{rptrSpotlight.currentItem.fileDescription}"
                FileID = "{rptrRecentlyViewed.currentItem.fileName}"    
                Title="{rptrSpotlight.currentItem.fileTitle}" />
        </mx:Repeater>
    </mx:VBox>
</mx:Canvas>

取扱い機能

private function PlayFile(fileName:String):void{
    Alert.show(fileName.toString());
}
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top