« Balls – Transparent Apollo Sample – full source code | Main | FotoBooth Apollo Edition »
GrabIt HTML within Apollo
| By Rich Tretola | March 19, 2007 | |
| 6,385 views |

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.
Topics: Adobe AIR | 24 Comments »







March 19th, 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.
Reply to this comment
March 19th, 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.
Reply to this comment
March 22nd, 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
Reply to this comment
March 22nd, 2007 at 6:13 am
You can use the addChild function to add content to your windows.
Reply to this comment
March 23rd, 2007 at 8:30 am
Is it possible to get the source code for this program?
Reply to this comment
March 23rd, 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.
Reply to this comment
March 23rd, 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?
Reply to this comment
March 23rd, 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>’;
Reply to this comment
March 23rd, 2007 at 12:00 pm
I meant how to take a screenshot of the content?
Reply to this comment
March 23rd, 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.
Reply to this comment
March 23rd, 2007 at 12:48 pm
Excellent, thanks!
Reply to this comment
April 1st, 2007 at 4:04 am
[...] – http://blog.everythingflex.com/2007/03/19/grabit-html-within-apollo/ [...]
October 3rd, 2007 at 11:32 am
Thanks for the tips on getting innerHTML. Do you have any pointers on how you create the browser images? You mentioned you might post a tutorial. Even a hint would be useful because I’ve tried searching and hacking myself but to no avail.
Reply to this comment
January 16th, 2010 at 10:27 am
That takes very long time to have more information about this good topic hence, the custom writing service can support everybody to get a right pre written essay and to buy custom essay papers.
Reply to this comment
April 4th, 2010 at 10:21 am
[...] looking at the outdoor/camping section and leaving with something. A trip to Bass Pro? Forget itGrabIt HTML within Apollo | EverythingFlex: Flex & AIRGrabIt HTML within Apollo. By Rich Tretola | March 19, 2007. 4,722 views. The Apollo HTML … The [...]
April 5th, 2010 at 10:28 am
Hey people! You are amazing! Thanks for your posts! I find them very useful! But I am still going to apply to my writing service for deeper explanation of this topic. They have always helped me. I hope this time they won’t fail too.
Reply to this comment
May 27th, 2010 at 6:49 am
Thanks for the tips on getting innerHTML. Forget itGrabIt HTML within Apollo
Reply to this comment
June 5th, 2010 at 1:26 pm
Forget itGrabIt HTML within Apollo
Reply to this comment
June 7th, 2010 at 11:33 pm
You can buy essay or even buy essays at the best writing service. Just do it.
Reply to this comment
June 8th, 2010 at 10:14 am
if you work and have no time to study, buy essay and be happy.
Reply to this comment
June 22nd, 2010 at 5:26 am
be happy
Reply to this comment
June 24th, 2010 at 1:38 am
made by ksharp
Reply to this comment
September 7th, 2010 at 6:43 am
if you have no time to learning,buy essay, it will help you in learning and save your time
Reply to this comment
September 9th, 2010 at 5:26 am
Apollo kit with safarai that’s too much interesting.
Reply to this comment