This content has been marked as final. Show 6 replies
You won't be able to embed the image / audio data in the external HTML once your external HTML file has access to the filenames / actual binary data.
Maybe you should re-design your application so that there is a XML file with only the data you want to display. The images / audio / main app is all AIR.
thx for the answer,
of course i can expend a lot of time rebuilding the application to build an air ready application, but what I only need is to execute the application faster.
Is an application using extjs and zend framework and for extjs no problem, but rebuild all serverside to work with local html files on air will be a lot of time
My idea was to simpli store all extjs, tinyMCE, images, etc on local drive instead downloading it any time the users enter via browser.
I want (if I can) to build an aplication in air as a webbrowser optimized for a concrete site.
This is the only way I can think of:
Download the html file from your server using URLLoader (make sure the pages are using relative paths to imgs / audio). Now you can either save it to file or directly set it to HTMLLoader via load() / loadString() respectively. If you have the images and audio in your air app's folder, it will pick them up here.
The point here is that mixing server side and local content will not be easy. But if you bring all the data from server to client and make AIR believe everything was loaded from AIR's application folder, what you say can be accomplished.
I' m trying to do that:
var htmlLoader = new air.HTMLLoader();
but no luck, what I'm missing?
Don't create a new HTMLLoader like that. If you want the main window's HTML to change, use window.htmlLoader.loadString("<html><body><p>Boo!</p></body></html>");
If you want it to popup in a new window, use var popupHTML = air.HTMLLoader.createRootWindow(); popupHTML.loadString("whatever");
now is working as i need!!!