flex cacheAsBitmap invalidated on child when parent alpha/visible are updated


have custom component in flash builder following structure:

turnhighlightcomponent:

 

 

<s:group .....

 

          <s:states>

              <s:state name="left_right"/>

             <s:state name="top_bottom"/>

             <s:state name="edges"/>

          </s:states>

 

          <s:group id="grpcache" x="0" y="0" width="160" height="160" cacheasbitmap="true">

                              

             <s:path

                          data.left_right="l 152 -15 l 0 33 l -152 73"

                          data.top_bottom="m 40 0 l 30 0 l 40 112 l -110 0 l 40 -112"

                          data.edges="m 50 0 l 50 0 l -20 112 l -100 0 "

                          y="42" x="4"

                          filters="{[filtercollection.turnhighlightglow]}"

                          >

                   <s:fill>

                           <s:solidcolor color="0xffffff"/>

                    </s:fill>

             </s:path>

</s:group>

</s:group>

 

  

"path" never change. component.currentstate never change. grpcached never change.

component animated infrequently with:

 

    tweenmax.to( this, 0.3, {autoalpha:1, ease:quint.easeinout});

and

 

    tweenmax.to( this, 0.3, {autoalpha:0, ease:quint.easeinout});

 

 

my assumption path expensive glow filter applied drawn once , cached in grpcache forewer.

 

however, in scout see every time parent component animated, grpcache gets updated, path rendered , glow filter applied:

 

cacheasbitmap1.png

 

what wrong setup?

 

i checked no properties may invalidate cached bitmap touched.

i've tried setting blendmode:layer, clipandenablescrooling:true on grpcache, tryed removing filter , states - not help.

 

 

1) there place breakpoint or event find out caused cached bitmap invalidation?

2) cached bitmap invalidated on children when parent gets invisible?

 

know in particular case can replace path pgn image. problem happends on other components change infrequently want find out problem is. thing comes mind grpcached inherits settings parent in display tree , invalidates cached bitmap.

yes, bitmaps have redrawn whenever there's alpha change.



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

Thread: Firefox print dialog doesn't remember settings

Error 400 - Photoshop services are not available

After Effects error:creating resource file on Windows