4 Replies Latest reply on Oct 28, 2009 5:41 PM by alitanucer

    Flex 4 SDK - Can BitmapFill mxml tag source be a DisplayObject ?

    alitanucer

      Hi,

       

      I tried to figure out how i can have a dynamic BitmapFill source (DisplayObject) for the new FXG tags in Flex 4.

      I am not sure if it is possible and how it is possible to set the source as DisplayObject to fill.

       

      From the Gumbo language reference >> http://livedocs.adobe.com/flex/gumbo/langref/mx/graphics/BitmapFill.html

      it says that i can set the source with a DisplayObject. i am not sure if this is valid for the BitmapFill mxml tag.

       

      This will be great since Defraga has a new VectorFill tag for this and Flex 4 version will be really sophisticated if you can manage to do the same thing with BitmapFill tag. VectorFill is also a BitmapFill which the code generates the bitmap on the fly for the DisplayObject.

       

      I am afraid that the Flex 4 version of the graphic tags will not have the same functionality like Defraga. Hopefully it will not be the case.

       

      Ali Tan Ucer.

        • 2. Re: Flex 4 SDK - Can BitmapFill mxml tag source be a DisplayObject ?
          deepa subramaniam (adobe) Level 2

          Hi There - Right now, I believe a BitampFill object (as well as the BitmapImage graphic element) can take embedded assets (that is by specifying a source which uses the @Embed directive) as well as pointing the source object to dynamic assets that are loaded at runtime (either to a local file, or a trusted URL). Additionally, BitmapFill can take a display object as its source and it will create a bitmap rendering of said display object. If this isn't working for you, can you please file a bug in JIRA and include a bugfile showing the buggy behavior?

           

          Thanks,

          deepa

          • 3. Re: Flex 4 SDK - Can BitmapFill mxml tag source be a DisplayObject ?
            matt_chotin Level 3

            Actually BitmapImage will no longer support loading dynamic assets.  

            Because the files ned to be trusted this behavior is unpredictable and 

            can be difficult to debug if it fails.  Rather than be inconsistent 

            about what external assets are supported we're limiting the 

            functionality for 4.0 and will look into a more full-featured support 

            in the next release (you can use mx:Image if you need external support 

            now).

             

            Matt

            • 4. Re: Flex 4 SDK - Can BitmapFill mxml tag source be a DisplayObject ?
              alitanucer Level 1

              If you read my question carefully, you will notice that i am not asking about loading a BitmapImage dynamicly.

              I am aware of the adobe's hyper security settings , sandboxes and all that.

              All i need to do is to have a vector drawing and/or a dynamically created display object as the BitmapFill source.

              Now we have the FXG format built inside Flex4. It is more or less resembles Defraga and Defraga has a Vectorfill tag which you can feed a vector drawing.

              I know, it is basically a bitmapfill behind the scenes.

              So instead of creating a png image in photoshop, we can create a vector drawing with FXG tags and feed the drawing to the BitmapFillinorder to repeat the drawing to create a pattern.

               

              That is the only reason i asked the question in the following format >> "BitmapFill mxml tag"

              This is the new FXG tag, and i am afraid it is again crippled implementation of Defraga.

               

              Hope it will change.

               

              Ali