4 Replies Latest reply on Jul 25, 2017 12:25 PM by David Marston

    Embedding HTML

    David Marston Level 1

      Hi,

       

      I'm trying to achieve two things:

       

      1)  I'd like to embed in an app content from a website. This is so I can update content on a page without having to create a new version of the app.

       

      2) I would also like to be able to swipe content up and down. I've sussed swiping content left to right using the swipe function in code snippets (that works a treat).

       

      Basically, what I'm trying to achieve is the same thing you see in newspaper apps etc, you know, you install the app and you see updated content everyday without having to install the latest version of the app.

       

      Thanks for any advice in advance.

        • 1. Re: Embedding HTML
          Colin Holgate MVP & Adobe Community Professional

          If you want to show a web app inside an AIR app you could either use StageWebView or one of the ANEs that does the same thing. The non-Adobe ones have advantages over StageWebView in AIR 25 and earlier, but AIR 26 has amore modern web view that may do fine.

           

          You would task the web app developer with supporting touch and mobile. Many things will come for free, such as page scrolling, and plenty of people have figured out how to solve showing paged content on mobile. If the web app works fine in Safari or Chrome on mobile, it should work the same in an AIR app.

           

          You could either dedicate the whole screen to the web view, and then have a custom URL as a way to let the app know that the user is trying to leave the web view, or you could leave some of the screen area unused, to make space for an exit button that is always there.

          • 2. Re: Embedding HTML
            David Marston Level 1

            Hi Colin and thanks for your prompt response.

             

            When you say web app, do you mean just a normal web page or would it be a web app developed in Animate. That's what I'm trying to clarify. I can code HTML and CSS so a web page is not a problem. It's embedding a web page's content in an app. So I can update the web page which will also update an installed app.

             

            Browsers automatically scroll to accommodate different amounts of content. That's what I'm trying to achieve in my app.

             

            I'm not sure what you mean about the exit button at all sorry. I don't know why someone would be wanting to leave anything???

             

            Thanks again.

            • 3. Re: Embedding HTML
              Colin Holgate MVP & Adobe Community Professional

              If you're making a mobile app with Adobe Animate normally the whole experience would be ActionScript 3, and the whole screen would be the regular Animate stage. If you're doing an app where one section of that is to be a web page, then you show a web view on top of the Animate stage. That web page can be developed in anything, it wouldn't have to be HTML5 Canvas using CreateJS. If you have shown a web view for that section, how does the user get back to the non-web view sections of the app? I was describing the two approaches to achieve that.

               

              If your entire app is to just be a web site, from beginning to end, you could either make an AIR app that shows the web view at the start, and is always just showing the web view, or you could use products such as PhoneGap, to make simple wrapper app for your web site.

              1 person found this helpful
              • 4. Re: Embedding HTML
                David Marston Level 1

                There's a few alternatives there Colin and I need to look in to it to see which best suits what I want to do.

                 

                Thanks for that. It's good stuff.