I am having a problem and I hope someone can help.
I am trying to open pdf files from my flash projector on top of the interface. A few problems...
1- using *********** jstart opens the files below the interface. (This app works well with word docs and excel files though)
2- flashgeek opens on top, but if the user clicks back on the interface the file disappears below and when the try to click it again, it remains below the interface. The user has to escape or quit to reaccess the file.
I am not sure how "topmost" works and I am not an expert on actionscript.
I need the file to open on top every time whether it is open below or not.
Is this possible???
Any help would be greatly appreciated
Thanks so much!!!
Oh heidi, didn't you just buy SWF Studio? If you are using SWF Studio for this project you don't need any of those external tools, you can do it all with SWF Studio. If this is an older project you're working on, let me know and I'll explain how to use topmost or one of my other FREE tools to do what you want. The fscommand chirsmitchell showed you above won't work (unless you're using Flash 5) if you've been banging your head on that one
Here's a BAT file that will make sure the Acrobat Reader is made the topmost application after your PDF file is opened. It uses a BAT file for loop to repeatedly call topmost so the PDF has time to load. In the BAT file in the ZIP file I attached there are a lot more X's which translates into a better chance of topmost working.
Code:
start test.pdf
set repeat=x x x x x x x x x x x x x x x x x x x x x
for %%i in (%repeat%) do call topmost Adobe
In the ZIP file I also included a file called test.exe which is a renamed copy of my PROXY utility to hide the ugly DOS box that appears when you run a BAT file.
Put everything in the ZIP file in the fscommand folder, then if you want to just run the BAT file you can just add fscommand("exec", "test.bat"); to your FLA.
If you use fscommand("exec", "test.exe"); you'll be using the proxy utility to launch the BAT file indirectly. What this does is hide the DOS box that appears when you run a BAT file.
If you want to open other PDF files, just make copies of TEST.BAT and TEST.EXE and rename them to say MYFILE.BAT and MYFILE.EXE and edit MYFILE.BAT to open the correct PDF file. Then use fscommand("exec", "myfile.exe") to open the PDF.
You'll need a BAT and EXE file for each PDF file you want to open.
Clear as mud right?
If you have any questions, just shout!
Note: This would be a one liner (of ActionScript) in SWF Studio
Yes- It worked great! I sent out the CD Yesterday.I can't wait to spend more time learning all SWF Studio can do. I was just curious about the .bat file method - I always hated that ugly black box!!
Thanks so much!
First up, thanks to Northcode for posting the solutions to opening word docs. Now I've been trying to address the pdfs-opening-behind problem and I have a few questions...
What do I do with the 'topmost.exe' file? I have put it in the fscommand folder, but only because there's nothing in the thread to say where to put it.
Also, does 'topmost.exe' need to be re-named to match the pdf name or left as is? And does the "pdf" part of the fscommand in flash have to be changed to the pdf name?
Does Northcode's post (featuring the bat file to make Acrobat open in front) supercede the 'topmost.exe' solution?
Sorry for all the questions, but I've tried everything I can think of.
Put all the files in the ZIP file (from the post above) in a folder called fscommand. Put your own projector in the same folder where the fscommand folder is. Your projector should call fscommand("exec", "test.exe") and that should open the test.pdf file in the fscommand folder.
I have a new cd executed full-screen Flash projector which works well.
BUT, now I want it to be able to launch websites from this EXE.
It works OK to click on a button and do something like this:
on (release) {
getURL("http://www.website.com", "_blank");
}
That will open a website and put the browser in front of the Flash projector which is good.
BUT, if the user already has a browser open then it does not work! In that case, the websites I launch just load in the background behind the full screen interface.
Any ideas? Would topmost or something help with this?
Topmost would make all the browser instances come to the top so, YES, it would help but you might see multiple browser windows above your projector. That's the only drawback I can think of.
The attached ZIP file includes an FLA with the code below on a button. This launches a URL and then calls browser.exe from the fscommand folder to make any browser windows it finds the topmost windows.
The browser.exe file (in the fscommand folder) is just a renamed copy of my proxy.exe utility that launches a copy of browser.bat (also in the fscommand folder). The BAT file looks like this.
Code:
@echo off
set repeat=x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x
for %%i in (%repeat%) do call topmost Internet Explorer
for %%i in (%repeat%) do call topmost Mozilla Firefox
That just calls topmost looking for windows with "Internet Explorer" or "Mozilla Firefox" in their title and makes them topmost. You can add support for other browsers if they have some fixed text in their title bars that topmost can use to identify them.
Hey Northcode! Thanks again for all your help on this!
I am using Flash 8, and I think that is causing problems. I couldn't open the web.fla file. It said "Unexpected File Format"
So, I put the support files in the fscommand folder and tried doing the buttons.
When I tried to apply your button code to a button in the timeline, I got this error:
Statement must appear within on handler
test_btn.onRelease = function()
I'm going to keep plugging away at this for now...
I thought this would do it, but it didn't seem to do anything:
Thanks Northcode, but that doesn't work either.
I'd already tried this code before I bugged you!?
Originally Posted by Northcode
Just change your code to this
Code:
on (release) {
getURL("http://www.tacticalsolar.com");
fscommand("exec", "browser.exe");
}
With your code, or with my original non-topmost buttons, here is what happens:
I launch my full screen projector interface with web link buttons on it.
If I click on a link and there are NO web browsers open, then it works just fine, and a web browser pops up with the website in it, in front of the projector.
BUT if there is already a web browser open, when I push the button to launch a website, it will only work once more!
After opening a second website, then it will no longer open above the projector interface. No idea why not.
I just retested and I can't make this fail so there's some piece of the puzzle that I'm missing. I saved my FLA down to Flash 8 and made it go fullscreen at startup, it's in the ZIP attachment.
After opening a second website, then it will no longer open above the projector interface. No idea why not.
Uhhh, the browser should STILL be above the projector, and it should stay there. The ony way you can "hide" it is to minimize it or close it.
What OS are you seeing this on? (I'm using XP)
What browser are you using? (I'm using Firefox 3.0.13)
The newer version of Firefox may not be putting "Mozilla Firefox" in the title like the BAT file is looking for. If there is some fixed text in the title bar of the browser, change the BAT file to use that to make sure topmost.exe finds it and brings it to the top.
Firefox keeps telling me that 3.5 is available, I guess I should upgrade sometime