|
|
|
#1 |
|
Member
Join Date: May 2004
Posts: 41
|
opening pdf files on top of interface
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!!!
__________________
heidivandy |
|
|
|
|
|
#2 |
|
...domo...
Join Date: Mar 2001
Location: ...
Posts: 326
|
if you download topmost from http://www.extendingflash.com/utilities/topmost.html then in the actions for the whole projector put the following code:
fscommand("EXEC", "topmost.exe" + chr(9) + "pdf"); just make sure the pdf's are all located in a folder called fscommand. You may need to get the PDF to be called through a .bat file. I will put the code for the .bat file up if it is needed. This works for me. Christopher Mitchell
__________________
"All men are equal. All men, that is, who possess umbrellas." E.M. Forster Last edited by chrismitchell; 02-21-2006 at 10:04 PM. |
|
|
|
|
|
#3 |
|
Tim (Moderator)
Join Date: Dec 2000
Location: Ottawa
Posts: 3,600
|
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
|
|
|
|
|
|
#4 |
|
Member
Join Date: May 2004
Posts: 41
|
Could you please post the code for the .bat file. It would be greatly appreciated.
THanks
__________________
heidivandy |
|
|
|
|
|
#5 |
|
Tim (Moderator)
Join Date: Dec 2000
Location: Ottawa
Posts: 3,600
|
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
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
Last edited by Northcode; 02-22-2006 at 12:21 PM. |
|
|
|
|
|
#6 |
|
Member
Join Date: May 2004
Posts: 41
|
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!
__________________
heidivandy |
|
|
|
|
|
#7 |
|
Member
Join Date: Aug 2007
Posts: 31
|
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. |
|
|
|
|
|
#8 |
|
Tim (Moderator)
Join Date: Dec 2000
Location: Ottawa
Posts: 3,600
|
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.
|
|
|
|
|
|
#9 | |
|
Member
Join Date: Oct 2000
Posts: 41
|
I think my problem is similar to Heidi Vandy's...
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: Quote:
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? |
|
|
|
|
|
|
#10 |
|
Tim (Moderator)
Join Date: Dec 2000
Location: Ottawa
Posts: 3,600
|
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.
|
|
|
|
|
|
#11 | ||
|
Member
Join Date: Oct 2000
Posts: 41
|
OK, I have topmost.exe in my fscommand folder.
I can't get it to open any webpages though. All of the examples of topmost usage that I've found are for opening PDFs or other things. I currently open my webpages with buttons something like this: Quote:
Quote:
|
||
|
|
|
|
|
#12 |
|
Tim (Moderator)
Join Date: Dec 2000
Location: Ottawa
Posts: 3,600
|
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.
Code:
test_btn.onRelease = function()
{
getURL("http://www.northcode.com");
fscommand("exec", "browser.exe");
}
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 |
|
|
|
|
|
#13 | ||
|
Member
Join Date: Oct 2000
Posts: 41
|
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: Quote:
I thought this would do it, but it didn't seem to do anything: Quote:
Last edited by Graz73; 09-14-2009 at 02:33 PM. Reason: more code clarification |
||
|
|
|
|
|
#14 |
|
Tim (Moderator)
Join Date: Dec 2000
Location: Ottawa
Posts: 3,600
|
Just change your code to this
![]() Code:
on (release) {
getURL("http://www.tacticalsolar.com");
fscommand("exec", "browser.exe");
}
|
|
|
|
|
|
#15 | |
|
Member
Join Date: Oct 2000
Posts: 41
|
Thanks Northcode, but that doesn't work either.
I'd already tried this code before I bugged you!? Quote:
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. |
|
|
|
|
|
|
#16 | |
|
Tim (Moderator)
Join Date: Dec 2000
Location: Ottawa
Posts: 3,600
|
I missed the fullscreen part, sorry about that!
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. Quote:
What OS are you seeing this on? (I'm using XP) What browser are you using? (I'm using Firefox 3.0.13) |
|
|
|
|
|
|
#17 |
|
Member
Join Date: Oct 2000
Posts: 41
|
I'll try your latest test. Thanks.
I now see what you mean, that the website should NOT go behind the interface even if I click on the projector. Strange... I'm using Windows XP and Firefox 3.5.3 |
|
|
|
|
|
#18 |
|
Tim (Moderator)
Join Date: Dec 2000
Location: Ottawa
Posts: 3,600
|
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
|
|
|
|
|
|
#19 |
|
Member
Join Date: Oct 2000
Posts: 41
|
The version of firefox I'm using DOES put "mozilla Firefox" in the name. For example, this page is:
Flash Kid Community Forums - Reply to Topic - Mozilla Firefox |
|
|
|
|
|
#20 |
|
Tim (Moderator)
Join Date: Dec 2000
Location: Ottawa
Posts: 3,600
|
If you open a browser and type topmost Mozilla Firefox at the command line, does that make Firefox the topmost window for you?
|
|
|
|
![]() |
|
||||||
| Thread Tools | |
| Display Modes | |
|
|