Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can pack any number of files into AIR app (although export time may rise substantially). You can't create 'just' executable, because AIR apps need to be installed and HTMLLoader will need separate files for pages and pictures anyway. Basically, all you need to do is: </p> <ul> <li>create AIR with mx:HTML as main content</li> <li>point mx:HTML to app:/index.html</li> <li>make sure your site files are embedded en masse into installer (put them into src dir) </li> </ul> <p>For pdf files to work in the browser, user need Acrobat installed. Flash content should work inside mx:HTML. <strong>Update:</strong><br> Hide all files from user is harder. I did something similar though, not entire site, but application with embedded pages and links.<br> All your content can be packed into some zip file (not in exe, even native AIR application cannot customize its exe wrapper.) You can even encrypt each file if you wish. The problem is links and files (pictures, styles and scripts.)<br> I solved pictures problem with data URI scheme (see my <a href="https://stackoverflow.com/questions/4303735/custom-images-for-htmlloader">question</a> - self-answered - about this.) I think other files can be embedded this way too.<br> To make links working, you need to listen to Event.LOCATION_CHANGE. New location will tell where HTML control <em>wants</em> to go (it will not be able to find page), unzip corresponding page and set it as htmlText. So, if you really wish to embed everything, that's what I would do:</p> <ul> <li>Pack all your files into one zip file for later unzipping using some library with non-sequential zip access (I used coltware's airxzip)</li> <li>Make page serving system. This includes unpacking page, scanning it for used files (css, js, pictures), unpacking files, converting them into base64 and embedding into page with data:URI scheme. If your files aren't (or rarely) shared between pages, you can embed them before packing and use as is. I don't know if Webkit supports JavaScript via this protocol, even if not, you can convert it to text based script.</li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload