Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Figured it out (finally)</p> <p>Custom Component</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;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"&gt; &lt;mx:Script&gt; &lt;![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 } ]]&gt; &lt;/mx:Script&gt; &lt;mx:Metadata&gt; [Event(name="viewClick", type="flash.events.Event")] &lt;/mx:Metadata&gt; &lt;mx:Label x="11" y="9" text="{String(Title)}" styleName="listItemLabel"/&gt; &lt;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)}"/&gt; &lt;mx:Button x="20" y="65" label="View" click="viewClickHandler();" styleName="listItemButton" height="22" width="60"/&gt; &lt;mx:LinkButton x="106" y="68" label="Details..." styleName="listItemLink" height="18"/&gt; &lt;mx:HRule x="0" y="101" width="215"/&gt; </code></pre> <p></p> <p>The Repeater</p> <pre><code>&lt;mx:Canvas id="pnlSpotlight" label="SPOTLIGHT" height="100%" width="100%" horizontalScrollPolicy="off"&gt; &lt;mx:VBox width="100%" height="80%" paddingTop="2" paddingBottom="1" verticalGap="1"&gt; &lt;mx:Repeater id="rptrSpotlight" dataProvider="{aSpotlight}"&gt; &lt;sm:SmallCourseListItem viewClick="PlayFile(event.currentTarget.getRepeaterItem().fileName);" Description="{rptrSpotlight.currentItem.fileDescription}" FileID = "{rptrRecentlyViewed.currentItem.fileName}" Title="{rptrSpotlight.currentItem.fileTitle}" /&gt; &lt;/mx:Repeater&gt; &lt;/mx:VBox&gt; &lt;/mx:Canvas&gt; </code></pre> <p>Handling function</p> <pre><code>private function PlayFile(fileName:String):void{ Alert.show(fileName.toString()); } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload