Business Factoring | Sacramento Chiropractor |

Calendar

March 2007
M T W T F S S
« Feb   Apr »
 1234
567891011
12131415161718
19202122232425
262728293031  

Tag Cloud

Categories

Archives

Highest Rated

Most Viewed

Recent Posts

Recent Comments


« Balls - Transparent Apollo Sample - full source code | Main | FotoBooth Apollo Edition »

GrabIt HTML within Apollo

By Rich Tretola | March 19, 2007Print This Post Print This Post
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
1,088 views

grabit.jpg

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.

Download the application

Share/Save/Bookmark

Topics: Adobe AIR |

13 Responses to “GrabIt HTML within Apollo”

  1. Ahmet Says:
    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.

  2. everythingflex Says:
    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.

  3. argv Says:
    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

  4. everythingflex Says:
    March 22nd, 2007 at 6:13 am

    You can use the addChild function to add content to your windows.

  5. Sebastian Says:
    March 23rd, 2007 at 8:30 am

    Is it possible to get the source code for this program?

  6. everythingflex Says:
    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.

  7. Sebastian Says:
    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?

  8. everythingflex Says:
    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>’;

  9. Sebastian Says:
    March 23rd, 2007 at 12:00 pm

    I meant how to take a screenshot of the content?

  10. everythingflex Says:
    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.

  11. Sebastian Says:
    March 23rd, 2007 at 12:48 pm

    Excellent, thanks!

  12. Mike Downey » Apollo Alpha release link roundup Says:
    April 1st, 2007 at 4:04 am

    [...] - http://blog.everythingflex.com/2007/03/19/grabit-html-within-apollo/ [...]

  13. Barry Says:
    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.

Comments