
The Apollo HTML control is built with Webkit which is the same rendering engine used by Safari on Mac. The GrabIt application used the HTML control as a browser window. It then allows the user to take a screen shot of the web page being displayed and manage those screen shots using Apollo’s file system access. It also allows the user to view the source of the html and save that to the file system as well. There are some features using the FileSystem components that have been disabled in this build due to bugs with them being used within the windowing API.
In this application all files are stored within the File.appStorageDirectory. For more information on File and FileStream please see this post.







March 19, 2007 at 6:58 pm
Great demo,
I’m writting right now from Grabit. Just some issue
- cannot display swf from html
- keyboard is all mess up, it’s hard to find special char.
March 19, 2007 at 7:06 pm
There are some limitations with the alpha dealing with certain characters and function keys. Also, swf is not yet supported withinin the HTML component of this alpha.
March 22, 2007 at 5:02 am
hi,
how you could add content in new nativewindows, when you creating these. for instance when i want view a saved snag…so it appears an neu native window with content…so die alphaDoc writes that in the alpha release its not possible to add content in new native windows….how did you get this?
merci
March 22, 2007 at 6:13 am
You can use the addChild function to add content to your windows.
March 23, 2007 at 8:30 am
Is it possible to get the source code for this program?
March 23, 2007 at 10:43 am
The source will not be released for this one, but if you have specific questions, please ask and I will try to help.
March 23, 2007 at 11:24 am
Alright, just wanted to know more about how to actually capture what’s in the HTML control. Is that functionality built in the actual control or how does that work?
March 23, 2007 at 11:31 am
Here is the code used to retrieve the HTML. Adobe is currently considering making this part of the API where it would return in the htmlText property. html is the id of the mx:HTML control.
var str:String = html.htmlControl.window.document.documentElement.innerHTML;
str = str.replace(/\r/g, File.lineEnding);
str = ‘<html> + str + ‘</html>’;
March 23, 2007 at 12:00 pm
I meant how to take a screenshot of the content?
March 23, 2007 at 12:22 pm
Oh, take a look at the PNGEncoder and JPGEncoder classes that are part of the core lib:
http://code.google.com/p/as3corelib/
I’ll see if I have time to put up another tutorial on this.
March 23, 2007 at 12:48 pm
Excellent, thanks!
April 1, 2007 at 4:04 am
[...] – http://blog.everythingflex.com/2007/03/19/grabit-html-within-apollo/ [...]