This is how I am using the TileList and the related classes. Please help me 
with this weird problem

Declaration inside mxml.

      <local:ImageGrid
          id="imageGrid"
          left="10" right="10" top="10" bottom="10"
          backgroundAlpha="0" borderStyle="none"
          dataChangeEffect="{imageMoveEffect}"
          dataProvider="{_dataProvider}"
          itemRenderer="ImageGridRenderer"
          showEffect="{imageGridEffect}"
     />

ImageGrid.mxml

<mx:TileList 
  xmlns:mx="http://www.adobe.com/2006/mxml"; 
  width="400" height="300"
  dragEnabled="true"
  dropEnabled="true"
  dragMoveEnabled="true"
  borderStyle="none"
  borderThickness="0"
  focusThickness="0"
  columnWidth="110"
  rowHeight="120"
/>


ImageGridRenderer.mxml

<mx:VBox 
  xmlns:mx="http://www.adobe.com/2006/mxml"; 
  xmlns:local="*"
  verticalScrollPolicy="off" horizontalScrollPolicy="off"
  verticalGap="0"
  paddingBottom="5" paddingLeft="5" paddingRight="5" paddingTop="5"
  verticalAlign="top"
>
  <local:PreviewBox 
    id="preview"
    width="100%" height="100%" 
    infoM="{MyInfo(data)}"
    imageAlign="top"
    filters="{[new DropShadowFilter(4, 45, 0, 1)]}"
    horizontalScrollPolicy="off"
    verticalScrollPolicy="off"
  />
  <mx:Canvas width="100%" horizontalScrollPolicy="off">
    <mx:Label 
      text="{data.name}" 
      textAlign="center" 
      width="100%" 
      selectable="false" 
      toolTip="{data.name}"
      bottom="0" 
    />
  </mx:Canvas>
</mx:VBox>

PreviewBox.as

<?xml version="1.0" encoding="utf-8"?>
<mx:Box 
  xmlns:mx="http://www.adobe.com/2006/mxml";
  xmlns:local="*"
  borderStyle="none"
  disabledColor="#888888"
  backgroundAlpha="0"
  verticalScrollPolicy="off"
  horizontalScrollPolicy="off"
>

omitted the script tag for simplicity case.
This class either sets the source for the image as a URL or fetches bitmapdata 
and attaches it to the image. It sets the image source to a predefined 
bitmapasset until it fetches the actual image data

  <mx:Glow 
    id="outEffect" duration="300" 
    alphaFrom="1.0" alphaTo="0.3" 
    blurXFrom="15.0" blurXTo="0" 
    blurYFrom="15.0" blurYTo="0" 
    color="0xFFFFFF"
  />
  <mx:Glow 
    id="overEffect" duration="300" 
    alphaFrom="0.3" alphaTo="1.0" 
    blurXFrom="0" blurXTo="15.0" 
    blurYFrom="0" blurYTo="15.0" 
    color="0xFFFFFF"
  />
  <mx:Fade id="showEffect" target="{previewImage}" duration="300" alphaFrom="0" 
alphaTo="1" />
  
  <mx:Canvas width="100%" height="100%" buttonMode="true" useHandCursor="true">
    <mx:Image 
      id="previewImage" 
      width="100%" height="100%"
      visible="false" 
      maintainAspectRatio="true"
      horizontalAlign="center" 
      verticalCenter="0"
      horizontalCenter="0"
      verticalAlign="{imageAlign}"
      showEffect="{showEffect}"
    />
    <mx:Button
      id="previewBtn" 
      width="50" height="50"
      verticalCenter="0" horizontalCenter="0"
      visible="{enablePreview(_title) &amp;&amp; previewImage.visible}"
      includeInLayout="{showExtras}"
      buttonMode="true" useHandCursor="true" 
      upSkin="{InitialPlayButton}"
      overSkin="{InitialPlayButton}"
      downSkin="{InitialPlayButtonOver}"
      disabledSkin="{InitialPlayButton}"
      click="showPreview(event)"
    />    
    <local:Spinner 
      id="bufferingSpinner"
      horizontalCenter="0" 
      verticalCenter="0"
      visible="false"
      includeInLayout="{showExtras}"
      alpha=".5"
      hide="bufferingSpinner.stop()"
      show="bufferingSpinner.play()"
    />
  </mx:Canvas>
</mx:Box>



----- Original Message ----
From: ben.clinkinbeard <[EMAIL PROTECTED]>
To: [email protected]
Sent: Thursday, 6 December, 2007 7:48:31 AM
Subject: [flexcomponents] Re: TileList Memory Issues - not freeing up renderers









  


    
            Just FYI, its going to be hard for anyone to help either of you 
unless

you post a test case.



Ben



--- In flexcomponents@ yahoogroups. com, "florian d'erfurth"

<captain.herisson@ ...> wrote:

>

> I don't have any solution but i want to say that it's also happening

> with List, and not only on scrolling but also on mouse over etc.

> 

> The bug is only more visible with custom item renderers because they

> use more memory, anyway seems that's a serious flex bug.

> 

> --- In flexcomponents@ yahoogroups. com, "rueter007" <rueter007@> wrote:

> >

> > Hello, I hope Alex or Ted or somebody can be help me with this issue.

> > 

> > I am using a Tilelist component with custom item renderers(image and

> > some text). I knew that the list and grid components reuse the item

> > renderers rather than creating new ones. But the tilelist is behaving

> > weirdly. Everytime I scroll down through the TileList, it is creating

> > new renderers and not freeing up the old ones. When I scroll back up,

> > it is creating new renderers again. The same happens when the

> > dataprovider changes. So, the memory quickly jumps very high even upon

> > simple scrolling and the application crashes. These renderers are

> > never let go. So if I have 10 items in the tilelist and I scroll up

> > and down a few times, the number of renderers goes to 200 or even

> > more. I get this information from the profiler. 

> > 

> > I do not know what the solution to this problem is. I have searched

> > online and saw a couple of other folks have the same issue with the

> > tilelist but haven't found a solution.

> > 

> > Any help is appreciated.

> > 

> > thanks,

> > venkat

> >

>





    
  

    
    




<!--

#ygrp-mkp{
border:1px solid #d8d8d8;font-family:Arial;margin:14px 0px;padding:0px 14px;}
#ygrp-mkp hr{
border:1px solid #d8d8d8;}
#ygrp-mkp #hd{
color:#628c2a;font-size:85%;font-weight:bold;line-height:122%;margin:10px 0px;}
#ygrp-mkp #ads{
margin-bottom:10px;}
#ygrp-mkp .ad{
padding:0 0;}
#ygrp-mkp .ad a{
color:#0000ff;text-decoration:none;}
-->



<!--

#ygrp-sponsor #ygrp-lc{
font-family:Arial;}
#ygrp-sponsor #ygrp-lc #hd{
margin:10px 0px;font-weight:bold;font-size:78%;line-height:122%;}
#ygrp-sponsor #ygrp-lc .ad{
margin-bottom:10px;padding:0 0;}
-->



<!--

#ygrp-mlmsg {font-size:13px;font-family:arial, helvetica, clean, sans-serif;}
#ygrp-mlmsg table {font-size:inherit;font:100%;}
#ygrp-mlmsg select, input, textarea {font:99% arial, helvetica, clean, 
sans-serif;}
#ygrp-mlmsg pre, code {font:115% monospace;}
#ygrp-mlmsg * {line-height:1.22em;}
#ygrp-text{
font-family:Georgia;
}
#ygrp-text p{
margin:0 0 1em 0;}
#ygrp-tpmsgs{
font-family:Arial;
clear:both;}
#ygrp-vitnav{
padding-top:10px;font-family:Verdana;font-size:77%;margin:0;}
#ygrp-vitnav a{
padding:0 1px;}
#ygrp-actbar{
clear:both;margin:25px 0;white-space:nowrap;color:#666;text-align:right;}
#ygrp-actbar .left{
float:left;white-space:nowrap;}
.bld{font-weight:bold;}
#ygrp-grft{
font-family:Verdana;font-size:77%;padding:15px 0;}
#ygrp-ft{
font-family:verdana;font-size:77%;border-top:1px solid #666;
padding:5px 0;
}
#ygrp-mlmsg #logo{
padding-bottom:10px;}

#ygrp-vital{
background-color:#e0ecee;margin-bottom:20px;padding:2px 0 8px 8px;}
#ygrp-vital #vithd{
font-size:77%;font-family:Verdana;font-weight:bold;color:#333;text-transform:uppercase;}
#ygrp-vital ul{
padding:0;margin:2px 0;}
#ygrp-vital ul li{
list-style-type:none;clear:both;border:1px solid #e0ecee;
}
#ygrp-vital ul li .ct{
font-weight:bold;color:#ff7900;float:right;width:2em;text-align:right;padding-right:.5em;}
#ygrp-vital ul li .cat{
font-weight:bold;}
#ygrp-vital a{
text-decoration:none;}

#ygrp-vital a:hover{
text-decoration:underline;}

#ygrp-sponsor #hd{
color:#999;font-size:77%;}
#ygrp-sponsor #ov{
padding:6px 13px;background-color:#e0ecee;margin-bottom:20px;}
#ygrp-sponsor #ov ul{
padding:0 0 0 8px;margin:0;}
#ygrp-sponsor #ov li{
list-style-type:square;padding:6px 0;font-size:77%;}
#ygrp-sponsor #ov li a{
text-decoration:none;font-size:130%;}
#ygrp-sponsor #nc{
background-color:#eee;margin-bottom:20px;padding:0 8px;}
#ygrp-sponsor .ad{
padding:8px 0;}
#ygrp-sponsor .ad #hd1{
font-family:Arial;font-weight:bold;color:#628c2a;font-size:100%;line-height:122%;}
#ygrp-sponsor .ad a{
text-decoration:none;}
#ygrp-sponsor .ad a:hover{
text-decoration:underline;}
#ygrp-sponsor .ad p{
margin:0;}
o{font-size:0;}
.MsoNormal{
margin:0 0 0 0;}
#ygrp-text tt{
font-size:120%;}
blockquote{margin:0 0 0 4px;}
.replbq{margin:4;}
-->








      __________________________________________________________
Sent from Yahoo! - the World's favourite mail http://uk.mail.yahoo.com

Reply via email to