1 Reply Latest reply on Nov 6, 2008 6:44 AM by m_hartnett

    inserting images into TitleWindows

      Hi all,

      I'm doing a proof of concept here and trying to illustrate a point but I'm having a little difficulty as its beyond my Flex skills at the moment. That or I can't see the wood from the trees. If you go to http://www.tookiebunten.com/takethestreets/main.html you'll get the idea of what I'm trying to do.

      I have a tilelist populate from an array of images. When you click on an image I have a titleWindow popup. What i want to have is a larger image of the one click in the tilelist and further information that array holds.

      Does anybody have any ideas of how to do this or do you have a better way to do it?

      Thanks in advance.

      my example
        • 1. Re: inserting images into TitleWindows
          m_hartnett Level 3
          When you click on the tile object it is now available to you as the selectedItem attribute. Once you have the selectedItem determine the data that needs to be passed to the TitleWindow such as the imageName, imagePath and any other info you want to display on int the TitleWindow.

          You need to open the title window and set some variables in the title window.

          //Get the selectedItem from the TileList
          var tileList : TileList = tileListCanvas.getChildAt(0) as TileList;
          var selObj : Object = tileList.selectedItem;

          //Create a reference to your title window
          var eWin:IFlexDisplayObject = PopUpManager.createPopUp (this.parentApplication as DisplayObject, DocumentDetailEdit, true);

          //Set some variables in the title window
          DocumentDetailEdit(eWin).sourceObj = null;
          DocumentDetailEdit(eWin).browseSystemAssetId = selObj.systemAssetId;
          DocumentDetailEdit(eWin).browseTitle = selObj.assetTitle;
          DocumentDetailEdit(eWin).browseDescription = selObj.description;
          DocumentDetailEdit(eWin).isNewEdit = true;

          In the initialize or creationComplete or through databinding your TitleWindow can use the variables to get the image / set the data. I would try to use databinding for this as much as possible.