How to incorporate in a web page?

Bringing your stacks to the web

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

How to incorporate in a web page?

Post by MaxV » Wed Sep 02, 2015 1:41 pm

I create some HTML5 apps, but I still don't understand how to incorporate in a webpage.
I read the html source, but it's very complex.
Any idea?
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

zaxos
Posts: 222
Joined: Thu May 23, 2013 11:15 pm
Location: Greece

Re: How to incorporate in a web page?

Post by zaxos » Wed Sep 02, 2015 1:51 pm

Install xamp, put ur compiled stack in http folder and run the webpage from localhost/mypage, aparently html5 for livecode only works on a webserver
Knowledge is meant to be shared.

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: How to incorporate in a web page?

Post by [-hh] » Wed Sep 02, 2015 5:42 pm

Hi all,
perhaps MaxV means to have his *own* webpage, not the generated one?

Then here are the steps:

1. Compile your stack maxv1.livecode
2. Go to the folder in that you saved your standalone js, which is called
standalone-community-8.0.0-dp-4.js
3. Create a text file with your preferred text editor (or use LC, name the file
(say) myMaxv1.html
4. Paste the source code below and save.
5. Open Safari or Firefox (if you don't want to use a web server)
6. Open with that browser your file myMaxv1.html (or drag its icon into the browser window)
9. Lean back and enjoy.

The following is between the first div-group (<div> ... </div>) a copy from the HTML5-Guide, see dictonary of latest LC 8. Don't change anything inside this group.

Code: Select all

<html>
   <body>
   <!-- Here you write your own poetry !-->
   <h1>Here is the standalone of MaxV<br> 
    created by LC-community-8.0.0-dp-4</h1>
    <div><!--Don't change start !-->
    <canvas style="border: 0px none;"
            id="canvas" oncontextmenu="event.preventDefault()"></canvas>
     <script type="text/javascript">
       var Module = { canvas: document.getElementById('canvas')  };
     </script>
    <script async type="text/javascript" src="standalone-community-8.0.0-dp-4.js"></script>
    </div><!--Don't change stop !-->
    <div> <!-- Here you write again your own poetry !-->
    <p>These are my closing comments. <b>Praise the dev team.</b>
    </p>
    <small>Greetings from [-hh]</small>
    </div>
  </body>
</html>
Hermann
shiftLock happens

MaxV
Posts: 1579
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

Re: How to incorporate in a web page?

Post by MaxV » Thu Sep 03, 2015 11:22 am

Thank you! It works publishing on internet.
I can't understand why it doesn't work loading the page from the PC... :?:
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: How to incorporate in a web page?

Post by [-hh] » Thu Sep 03, 2015 11:55 am

Depends on your browser. Probably the dev team currently concentrates on a few set of browsers that work. Safari and Firefox work also by doubleclicking the file (what you mean by "from PC", correct?), Chrome needs a web server (may be local). InternetExplorer does not (yet) work.
shiftLock happens

Post Reply

Return to “HTML5”