3 Replies Latest reply on Jan 29, 2010 4:29 PM by aktell2007

    Embedding html

    jimmyoneshot Level 1

      In my app I want to have live images of websites used as thumbnails. How I've achieved this so far is:-

       

      - Created several html components pointing to different websites and made them non visible so they don't show up in the app.

       

      - I've then created a function which effectively creates a snapshot of the content of each of these html components and puts these snapshots into image components (so their content can be scaled to small thumbnail sizes which html components content can't be) creating a live image thumbnail gallery of websites.

       

      - This function is activated upon the click of a button.

       

      The problem I have is the html components take a good few seconds/minutes to load their content and I have 10 of them and will need about 50 in my final app so obviously the snapshots that my function takes of many of the html components will be blank if the html components content has not yet loaded resulting in a thumbnail image gallery of many blank images.

       

      Is there any way to embed html components in an app so that the app will not load until all of these html components have had their content fully loaded?

       

      I've tried many different solutions for this problem and this seems like the simplest one but this seems like a big snag. I never realised getting live images of websites into a flex/air app would be so tough

        • 1. Re: Embedding html
          Jason Szeto Level 3

          I would highly recommend that you do your website snapshots on the server using whatever server technology you are currently using. Imagine opening up 20 browser tabs everytime you view your application. That's going to take a long time to download the content and render the webpages. Loading up 20 small thumbnail images at startup would be much faster. It is unlikely your thumbnail needs to reflect the current state of the website, so you only have to do the snapshot generation periodically (once a day, once a week? once a month?)

           

          Jason

          1 person found this helpful
          • 2. Re: Embedding html
            jimmyoneshot Level 1

            Yep that would be a good idea but I have no experience of using server side technologies in conjunction with flex. I wouldn't have any idea where to even start, coding wise when trying to get those images on the server as you say. Plus it is an adobe air desktop application that I'm making.

             

            It would be useful to have the screenshots of sites update themself once a week but I can't see how this could be achieved automatically as it may be a bit beyond me. Would this require php etc?

             

            The application that I'm making is one for my university course for an outside company as a work experience type of thing so I'm a bit of a beginner when it comes to flex and server side tech in general. The purpose of the app is to basically act as an interactive favourites menu of websites that also allows users to view their twitter feeds and link to the internet from these links of live images. So basically it has internet elements coming into it and links to webpages but it is desktop based as when it's completed it needs to be installed on a new tv product that the company I'm working for produces which will allow users to switch between a computer and tv. So it's basically gonna be put on a pc/tv product. I hope this makes sense. Just trying to give you an idea of what I'm after.

             

            This means that it has to be pretty much standalone once it's realeased meaning I wont be able to update it myself etc.

            • 3. Re: Embedding html
              aktell2007 Level 1

              Why don't you try to use 'IFrames' that could do the things you try to do, but I'm not familiar with FLEX Air stuff so I only guess that it could be of some help!

              Many people do not like the 'IFrames' but I looked at it again a couple of month ago and found that they had improve on the whole thing! looks actually very good revamped!

              regards aktell