9 Replies Latest reply on Aug 29, 2008 3:32 AM by B.O.H.R.

    Loading images dynamicly

    B.O.H.R. Level 1
      Hi,
      I'm wondering: is there posibility to display image which is represented in Flex app as an object?
      I'm asking because I would like to create application which should load image from local disk to flex app, display it, and save it to the database (using ie WebService or RemoteObject) and back: load image from database using remoting and then display it in Flex app.

      If there is such possibility, could you tell me some classes I should use to do that ?
      Best Regards
        • 1. Re: Loading images dynamicly
          Level 7

          "B.O.H.R." <webforumsuser@macromedia.com> wrote in message
          news:g91051$m01$1@forums.macromedia.com...
          > Hi,
          > I'm wondering: is there posibility to display image which is represented
          > in
          > Flex app as an object?
          > I'm asking because I would like to create application which should load
          > image
          > from local disk to flex app, display it, and save it to the database
          > (using ie
          > WebService or RemoteObject) and back: load image from database using
          > remoting
          > and then display it in Flex app.
          >
          > If there is such possibility, could you tell me some classes I should use
          > to
          > do that ?

          Ordinary Flex can't do this. You could probably do it in AIR. There's a
          separate forum just for AIR applications.


          • 2. Re: Loading images dynamicly
            B.O.H.R. Level 1
            quote:


            Ordinary Flex can't do this. You could probably do it in AIR. There's a
            separate forum just for AIR applications.



            Could you precise which things flex CAN'T ?:

            1. load image file from local disk and represent it as an object in Flex app?
            2. display image represented as object(created as above) in Flex app?
            3. transfer that object back and forth to database using BlazeDS ?

            Maybe there are posibilitie to make workaround of some inconviniences?
            I am asking becaouse I realy would like to create such app in Flex.

            • 3. Re: Loading images dynamicly
              Level 7

              "B.O.H.R." <webforumsuser@macromedia.com> wrote in message
              news:g91dr3$b0f$1@forums.macromedia.com...
              >
              quote:


              > Ordinary Flex can't do this. You could probably do it in AIR. There's a
              > separate forum just for AIR applications.
              >

              >
              > Could you precise which things flex CAN'T ?:
              >
              > 1. load image file from local disk and represent it as an object in Flex
              > app?
              > 2. display image represented as object(created as above) in Flex app?
              > 3. transfer that object back and forth to database using BlazeDS ?
              >
              > Maybe there are posibilitie to make workaround of some inconviniences?
              > I am asking becaouse I realy would like to create such app in Flex.

              Flex can create an AIR application.

              But a swf file can't read from the local drive.

              HTH;

              Amy


              • 4. Re: Loading images dynamicly
                B.O.H.R. Level 1
                so, as I good understand:
                1. is NO
                2 and 3 i YES right ?

                So if I find workaround to load file from local disk and place it into database points 2 and 3 are avalible in flex right ?

                P.S.
                I am not interested in AIR
                • 5. Re: Loading images dynamicly
                  wyattbiker Level 1
                  You can set it up with regular Flash so the user presses an Upload button and chooses the file.

                  http://livedocs.adobe.com/flex/3/html/help.html?content=17_Networking_and_communications_7 .html
                  • 6. Re: Loading images dynamicly
                    B.O.H.R. Level 1
                    Ok, this sample shows that there is possible to upload file to the server using PHP/ColdFusion.

                    But still I don't have clearness about displaying image represented as object (i.e. loaded from database ) in Flex app? is it possible ?


                    • 7. Re: Loading images dynamicly
                      wyattbiker Level 1
                      Flex cannot access a database directly. You need an intermediate web application. PHP ASP.NET or whatever on the web server to do it. So if your image is in a database (I assume some blob or binary), you need code to extract the image to a temporary file.

                      Flex can load image files from the webserver directly as long as the image is in a folder. Here is an example.
                      http://ntt.cc/2008/02/10/how-to-load-an-image-into-our-flex-application-from-url-with-sour ce.html
                      • 8. Re: Loading images dynamicly
                        Level 7

                        "wyattbiker" <webforumsuser@macromedia.com> wrote in message
                        news:g93dc2$5gv$1@forums.macromedia.com...
                        > Flex cannot access a database directly. You need an intermediate web
                        > application. PHP ASP.NET or whatever on the web server to do it. So if
                        > your
                        > image is in a database (I assume some blob or binary), you need code to
                        > extract
                        > the image to a temporary file.
                        >
                        > Flex can load image files from the webserver directly as long as the image
                        > is
                        > in a folder. Here is an example.
                        >
                        > http://ntt.cc/2008/02/10/how-to-load-an-image-into-our-flex-application-from-url
                        > -with-source.html

                        I think the back-end technology can pass back an image by using
                        content-type=image.


                        • 9. Re: Loading images dynamicly
                          B.O.H.R. Level 1
                          big thanks for replies it gave ma light in me idea