I have a client that has an existing flash site, and they want me to modify it to have their menu (its a restaurant) which they upload as a pdf every few days to be embedded within the movie (currently it pops over the site in a new window) what do I need to do to have flash look for that pdf and load it inline?
Is it a PHP thing? Actionscript?
I've seen loads of tutorials for creating dynamic galleries, but those are overkill. I only need to have a single page PDF....
To embed a PDF file, you'll need to convert it to SWF first. I used to use Flash Paper for this purpose, but that product has been discontinued. Integrating AVM1 stuff into an AS3 environment can also be a real bear. There's an open-source tool called SWF Tools that can convert a PDF file into SWF. Every page ends up in a separate file. Typically people stick the results into a some sort of page-flip Flash component. In your case, you can just load that single file.
okay, those options are not going to work, because I (they) want to keep user experience as it has been, where they upload a pdf that they have created and formatted. is there a way to have flash display a website WITHIN a movie? I could use PHP to generate the page....
okay, those options are not going to work, because I (they) want to keep user experience as it has been, where they upload a pdf that they have created and formatted. is there a way to have flash display a website WITHIN a movie? I could use PHP to generate the page....
You can't put a website inside a Flash movie. What you can do is put an IFRAME over it with absolute CSS positioning. Normally, this arrangement wouldn't work, as the Flash plug-in bypasses the browser's rendering engine. In this case, since you're putting a PDF in the IFRAME, it should work, as the file is displayed through a plug-in as well. In the Flash movie itself, you use ExternalInterface to call a Javascript function that toggle the display state of the IFRAME on and off. It's somewhat of a hack. You'll have to check it across different browsers to make sure it works properly.
SWF-Tools is a command-line tool. You use a PHP script to run it. It's a good solution provided that you have root access on the server. There is the downside of visitors not being able to select the text. You also need to implement scrolling and printing.
and this iframe would float over the top of the flash movie? wouldn't that break if the window was resized? it's a liquid layout with the movie in the center....
and this iframe would float over the top of the flash movie? wouldn't that break if the window was resized? it's a liquid layout with the movie in the center....
Yeah, it's going to be a challenge making it look right. If you position the iframe with the CSS attributes left, right, top, and bottom, it should resize with the window--in theory at least. Something tells me that it's going to break in IE6