Embed a browser in Flex - php

Anyone know of any documentation that would help me with trying to embed a web browser component into adobe flex.
I've seen in Adobe Air that there is a Item; however, in Adobe Flex 3 for a .swf file that would be somewhere - I do not see it.
Any ideas?

Only Air has that capability built in.
However there is a very good-looking component that you can find here:
http://drumbeatinsight.com/
It is paid-for though.
Open source solutions are here
http://sourceforge.net/projects/as3htmlparser/
and here:
http://code.google.com/p/htmlwrapper/

The Webkit engine is embedded in the AIR runtime. It is not embedded in the Flash plug-in, however, so you cannot embed a browser within a .swf (Flash application) running inside a Web browser (or even using a standalone, desktop .swf runtime) as the Flash plug-in doesn't support that. AIR is your only option for actually embedding a browser within a Flash application.
There are a number of examples on the Web of using s to position a browser component/window over a Flash application to make it look like you've embedded a browser inside of the Flash app. Before AIR came along, this was what a lot of Flash/Flex developers did.

Related

I want to upload videos / large files without flash plugin

I want to upload video (basically large files) without using Flash Plugin.
It would be better if it shows progressbar also.
Of course I don't want to use the browser's default browse button as it is not good for large files.
OR
Is there any javascript (or any js framework like jQuery) solution for uploading large files?
(prefferebly with progressbar)
Note : Currently I don't want to use HTML5
A hidden gem in the internet is PLUPLAOD
Before i found this I was bald from ripping my hair out in uplaoding files. plupload enables you to uplaod 2GB files or larger if you want, using chrome gears, html5, silverlight or flash proxies/capabilities
The best part is it detects what the current browser can handle and injects the correct proxy or handles the process manually in the core. If it does not support anything well then the user needs to upgrade his browser..
If you are using .NET here is a handler I found, tweaked and works well.
https://stackoverflow.com/a/6109862/706363
There are plenty of PHP examples.
This is truly an awesome JavaScript plugin!
Have a look at these links,
http://www.johnboy.com/blog/a-better-php-upload-progress-bar-using-jquery
jQuery ajax upload with progress bar - no flash
http://www.webappers.com/2011/01/24/jquery-file-upload-with-upload-progress-bar/
I did a normal google search and found these..

Javascript/Html5 Project - some questions

I am thinking of getting into JS/Html5 to do some web applications.
At the moment I am using Visual Studio Express 2010 (I am coming from a c#/silverlight/mssql background). Its nice. However, if I am doing html5/js I would prefer to write server side database lookup scripts in php for mysql, rather than mssql. VS does not cater for php mysql (as far as I know).
What ide is best for this? Do I need to install wamp server or somthing like that? (It needs to be free, this is just a hobby.)
Also, for non-database applications, eg simple games, how could I make my js/html5 app into as close as a downloadable app as possible? Is it possible? Downloading and unzipping a zip file is fine, if that has to be done.
The last thing I might need to know is how to save a text file to the hard drive. I think it can be done using Internet Explorer, but could you create a html page on the fly, with a copy button, which you could then instruct the user to paste into notepad, or somthing like that?
For IDEs, NetBeans is nice and simple, and works well for web stuff. You don't really need an IDE though. It won't be as helpful as it is in .NET. Plenty of web developers use simpler text editors. If you have a Mac I like TextMate.
If you need to serve files from a web server you will need a web server, but for most things you can develop just via the file system and file:// urls. You will run into problems if you're trying to do AJAX - see jQuery Ajax request from local filesystem (Windows file:///)
Downloadable apps can be pretty much implemented with the HTML5 Offline Application spec. See http://www.w3.org/TR/html5/offline.html for the formal stuff, but there are lots of examples, e.g. http://www.html5rocks.com/en/tutorials/appcache/beginner/.
As far as saving a text file, for security reasons I don't think that regular cross-platform JavaScript will let you do this. It's easy to do if you have a web server and you're serving up files and services for AJAX calls though.

turn web page into an image on the fly?

I was wondering if there was any way of turning an entire HTML page into a png (or other kind of image?) I'm trying to create PDFs on the fly, but it's pulling across my styles as text, but I want the styles to stay the same as the page (cufon and all). Any help would be appreciated! :)
This doesn't look straightforward. The backend (PHP etc.) doesn't do rendering, layout. It merely generates content.
The layout and visual aspects of the website are done by your client (browser) and the backend has no way of accessing this.
However, given an HTML file, there are libraries that can render it into a PDF like Prince XML that seem to be capable of this.
The only way to generate an image identical, or even near, what a visitor sees in their browser when viewing your site is to launch a browser and take a screenshot. You need the browser's rendering engine to render the page. All the libraries you find to do it without a browser create something much different than what the visitor sees, and won't render cufon or other fancy things at all.
Companies that offer screenshot previews of a webpage now run many servers, each running many virtual PCs, each running a full operating system and real web browser. They have all those systems pulling jobs, opening the webpages in real browsers, taking screenshots and saving images. You won't replicate that with a little PHP script.
http://ipinfo.info/html/rendering_services.php
Turning web pages into images and PDFs is a royal pain using PHP. Solutions often require OS level scripting, fake printer drivers, or screen capturing, which can make for a rather fragile setup. I ran into the same issue a few years ago and started working on native PHP extension that leveraged the Gecko engine to render HTML to PDF, but never finished it.
The best answer I've seen doesn't quite turn a full web page into a PDF, but instead does XML to PDF. XEP by RenderX is the commercial tool Apple uses to produce developer documentation in many formats, including HTML and beautifully rendered PDFs, from an XML source. The great thing about using the XEP tool in conjunction with PHP is that PHP deals with XML very well, so you can pass generated XML to the XEP binary, let it do the conversion to PDF, then deal with the resulting PDF file in PHP.
consider building a regular PDF file that resembles your web page:
PHP::PDF - constructing using php.
PDF Reference - file structure.

Displaying PowerPoint slides on a web page automatically

Anyone know of any Flash components that would do the job of displaying an external PowerPoint file (e.g. .PPT, .PPTX) file in a Flash movie on a web page? Or a way of automatically parsing uploaded PowerPoint docs from a PHP-based CMS and displaying them on a web page.
Our client needs to be able to upload a PowerPoint documents on their site without any intervention (if necessary).
I know about Slideshare and the like, but the content needs to live on the client's web server due to security restrictions. Also, Adobe Presenter seems to require Adobe software/plugins on the clients machine which wouldn't be ideal.
You could use Google Docs. It supports previewing PDF/PPT/DOC (Don't know about XLS) files.
I use it on one of my projects and it behaves very well.
You can call it using http://docs.google.com/gview?url=<your absolute file url here>
you could also use the embed=true parameter to embed it into your site, using an iframe or that sort of thing.
Hope this helps.
Using COM you can save a PPT as a PDF (see this question), and then use swftools' great (and free) pdf2swf utility to get nice swfs.
You can use http://ajaxdocumentviewer.com/. I use it on a large site with good success. It will require a flash or pdf viewer plugin.
Hmm have you looked at the new Sharepoint 2010? They do have some sort of integration with MS Office 2010. The demo i saw allows collaboration as well as uploading and viewing powerpoint slides (with all the nice transitions preserved) and even some minor edit functions.
For the browser I think they said that there isn't a need a install any plugins like flash or silverlight and works on all browsers.

Open Source Web PDF Viewer?

Is their any Open Source Web PDF Viewer?
Which has good api through which I can modify the looks of the viewer?
I had tried the Scribd, Google Docs, FlexPaper , and this also.
But it is not giving me, as I want.
Then i had downloaded the shadowbox but it has not given me information about how to use it?
So anyone know good web pdf viewer and it would be great if it offers the customization
And that should be great if it is in php.Thanks in advance...
I don't think you're going to find a PDF viewer that's in PHP. The decoding of the PDF format happens on the client, which means your only options are either relying on the client to do the decoding work for you (Adobe Reader, Google Chrome's built-in reader, OS X's Preview app, etc.), rendering it with Javascript, or figuring out some way to convert the PDF into HTML.
PDFs are so ubiquitous these days, that it doesn't make a whole lot of sense to me to want to try to render it for a client; rather, simply tell them that the file they're downloading is a PDF and offer links to either Chrome or Adobe Reader, and let the user view the PDF in whatever app they please.
There is a wonderful pdf viewer which is opensource too. The ui implementation is basic. You will have to work on it. But its awesome.
http://view.samurajdata.se/
There is also a project from Mozilla called PDF.js. They're hoping to get it to a point where it's available as part of Firefox.
Get it at: http://mozilla.github.com/pdf.js/
I've tried it out myself and it works very well. The only issue is the source JS files are about 1.4mb which is rather large and I couldn't minify them due to some weird coding standards.

Categories