1 Reply Latest reply on Oct 8, 2011 11:33 AM by Gustavo Duenas

    using a repeater to pass content to a title window

    Gustavo Duenas

      Hi I have a repeater that has a button and the button open a title window component from flex

      So far I use the name property of the button to pass the title from the repeater to the title of the titlewindow


      here it is:

      Vimeo is the name of the repeater

      <mx:button name="{vimeo.currentItem.title}"


      on the as3:



      so far I can open it with the names from the list.


      Also I have an html inside of the title window and I want to set its location from the parameters of the repeater

      so here is when it start to be hard to imagine a way to retrieve that information from the repeater and pass it to

      the location.


      here is my code.

      import mx.managers.PopUpManager;

                          import mx.containers.*;

                                    import mx.controls.Alert;

                                    import mx.rpc.events.FaultEvent;

                                    import mx.rpc.events.ResultEvent;

                                    import flsWindow;


                                    private function openWindowVimeo(event:MouseEvent):void{

                                              var myVimeoWindow:TitleWindow= TitleWindow(PopUpManager.createPopUp(this, flsWindow, true));



                                              myVimeoWindow.title = event.currentTarget.name;

                                              var myHtml:HTML= new HTML;

                                              myHtml.location={myText.text};//tried to make this happens though is always with error;











      <mx:HTTPService id="vimeoService" url="http://vimeo.com/api/v2/iglesiafls/videos.xml" resultFormat="e4x" fault="onFault(event)"/>


      <mx:XMLListCollection id="myVimeoList" source="{vimeoService.lastResult.video}"/>

                <mx:VBox width="340" height="334" x="699" y="422">

                          <mx:Repeater id="vimeo" dataProvider="{myVimeoList}">

                          <mx:Image source="{vimeo.currentItem.thumbnail_medium}" width="200" height="150"/>

                          <mx:Text id="titleText" text="{vimeo.currentItem.title}" color="#F5FBFC" fontSize="14" width="300"/>

                          <mx:Text text="{vimeo.currentItem.description}" color="#F5FAFB" width="300"/>

                          <mx:Text text="{vimeo.currentItem.url}" id="myText"/>

                          <mx:Button  name="{vimeo.currentItem.title}" label="ver video" click="openWindowVimeo(event)" enabled="true"/>