1 Reply Latest reply on Mar 4, 2009 8:13 PM by Newsgroup_User

    disappearing Images part 2

    EricGM
      I had the same problem with images disappearing when they were scrolled, etc. but solved it with the help of the post describing this method:
      quote:

      <mx:source>
      <display:Bitmap bitmapData="{xxxx.source.bitmapData}"/>
      </mx:source>
      (Thanks!!)

      But now the problem is that the image doesn't seem to behave well with layouts - it doesn't scale or participate in general (i.e. in a VBox the next item down would register at the top as thought the image wasn't there, or was very small). Has anyone come across this and found a solution? Maybe a different solution entirely to the disappearing image problem?

      Here's the necessary bit of my code (the images I'm loading are generally bigger than the canvas, I want them to scale down to fit the fluid layout):
      quote:

      <mx:Canvas id="uiImgCanvas" width="100%" height="100%">
      <mx:Image id="uiImageDisplay" scaleContent="true" height="{uiImgCanvas.height}" width="{uiImgCanvas.width}">
      <mx:filters>
      <mx:DropShadowFilter alpha=".5" blurX="15" blurY="15" distance="10.0"/>
      </mx:filters>
      <mx:source>
      <display:Bitmap bitmapData="{uiDotStrip.curSelection.imgFullsize.source.bitmapData}"/>
      </mx:source>
      </mx:Image>
      </mx:Canvas>



      Thanks for the help.
        • 1. Re: disappearing Images part 2
          Level 7

          "EricGM" <webforumsuser@macromedia.com> wrote in message
          news:gonfol$23o$1@forums.macromedia.com...
          >I had the same problem with images disappearing when they were scrolled,
          >etc.
          > but solved it with the help of the post describing this method:
          >
          quote:

          <mx:source>
          > <display:Bitmap bitmapData="{xxxx.source.bitmapData}"/>
          > </mx:source>
          (Thanks!!)
          >
          > But now the problem is that the image doesn't seem to behave well with
          > layouts
          > - it doesn't scale or participate in general (i.e. in a VBox the next item
          > down
          > would register at the top as thought the image wasn't there, or was very
          > small). Has anyone come across this and found a solution? Maybe a
          > different
          > solution entirely to the disappearing image problem?
          >
          > Here's the necessary bit of my code (the images I'm loading are generally
          > bigger than the canvas, I want them to scale down to fit the fluid
          > layout):
          >
          quote:

          <mx:Canvas id="uiImgCanvas" width="100%" height="100%">
          > <mx:Image id="uiImageDisplay" scaleContent="true"
          > height="{uiImgCanvas.height}" width="{uiImgCanvas.width}">
          > <mx:filters>
          > <mx:DropShadowFilter alpha=".5" blurX="15" blurY="15" distance="10.0"/>
          > </mx:filters>
          > <mx:source>
          > <display:Bitmap
          > bitmapData="{uiDotStrip.curSelection.imgFullsize.source.bitmapData}"/>
          > </mx:source>
          > </mx:Image>
          > </mx:Canvas>
          >


          Try wrapping it in UIComponent.