To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > General Help > Standalone & Applications

Reply
 
Thread Tools Display Modes
Old 02-18-2006, 05:03 PM   #1
heidivandy
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
heidivandy is offline   Reply With Quote
Old 02-21-2006, 10:00 PM   #2
chrismitchell
...domo...
 
chrismitchell's Avatar
 
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.
chrismitchell is offline   Reply With Quote
Old 02-21-2006, 11:53 PM   #3
Northcode
Tim (Moderator)
 
Northcode's Avatar
 
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
Northcode is offline   Reply With Quote
Old 02-22-2006, 11:08 AM   #4
heidivandy
Member
 
Join Date: May 2004
Posts: 41
Could you please post the code for the .bat file. It would be greatly appreciated.
THanks
__________________
heidivandy
heidivandy is offline   Reply With Quote
Old 02-22-2006, 12:11 PM   #5
Northcode
Tim (Moderator)
 
Northcode's Avatar
 
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
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
Attached Files
File Type: zip test.zip (81.9 KB, 933 views)

Last edited by Northcode; 02-22-2006 at 12:21 PM.
Northcode is offline   Reply With Quote
Old 02-22-2006, 12:27 PM   #6
heidivandy
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
heidivandy is offline   Reply With Quote
Old 07-07-2009, 08:27 AM   #7
moosefetcher
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.
moosefetcher is offline   Reply With Quote
Old 07-07-2009, 10:18 AM   #8
Northcode
Tim (Moderator)
 
Northcode's Avatar
 
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.
Northcode is offline   Reply With Quote
Old 09-11-2009, 03:05 PM   #9
Graz73
Member
 
Join Date: Oct 2000
Posts: 41
Arrow Flash exe and Websites

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:
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?
__________________
Graz73 is offline   Reply With Quote
Old 09-11-2009, 03:36 PM   #10
Northcode
Tim (Moderator)
 
Northcode's Avatar
 
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.
Northcode is offline   Reply With Quote
Old 09-14-2009, 11:11 AM   #11
Graz73
Member
 
Join Date: Oct 2000
Posts: 41
Unhappy Confusion

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:
on (release) {
getURL("http://www.tacticalpowerplant.com", "_blank");
}
Would I need to write something like this?:

Quote:



on (release) {
fscommand("EXEC", "topmost.exe" + chr(9) + "http://www.tacticalpowerplant.com");
getURL("http://www.tacticalpowerplant.com", "_blank");
}
I know that is way wrong...
__________________
Graz73 is offline   Reply With Quote
Old 09-14-2009, 11:41 AM   #12
Northcode
Tim (Moderator)
 
Northcode's Avatar
 
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");
}
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.
Attached Files
File Type: zip test.zip (108.3 KB, 68 views)
Northcode is offline   Reply With Quote
Old 09-14-2009, 02:21 PM   #13
Graz73
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:
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:

Quote:
on (release) {
test_btn.onRelease = function() {
getURL("http://www.tacticalsolar.com");
fscommand("exec", "browser.exe");
};
}
__________________

Last edited by Graz73; 09-14-2009 at 02:33 PM. Reason: more code clarification
Graz73 is offline   Reply With Quote
Old 09-14-2009, 03:01 PM   #14
Northcode
Tim (Moderator)
 
Northcode's Avatar
 
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");
}
Northcode is offline   Reply With Quote
Old 09-15-2009, 01:23 PM   #15
Graz73
Member
 
Join Date: Oct 2000
Posts: 41
Unhappy nope

Thanks Northcode, but that doesn't work either.
I'd already tried this code before I bugged you!?

Quote:
Originally Posted by Northcode View Post
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.
__________________
Graz73 is offline   Reply With Quote
Old 09-15-2009, 02:33 PM   #16
Northcode
Tim (Moderator)
 
Northcode's Avatar
 
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:
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)
Attached Files
File Type: zip test8.zip (106.4 KB, 81 views)
Northcode is offline   Reply With Quote
Old 09-15-2009, 04:42 PM   #17
Graz73
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
__________________
Graz73 is offline   Reply With Quote
Old 09-15-2009, 05:17 PM   #18
Northcode
Tim (Moderator)
 
Northcode's Avatar
 
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
Northcode is offline   Reply With Quote
Old 09-16-2009, 11:14 AM   #19
Graz73
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
__________________
Graz73 is offline   Reply With Quote
Old 09-16-2009, 02:53 PM   #20
Northcode
Tim (Moderator)
 
Northcode's Avatar
 
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?
Northcode is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > General Help > Standalone & Applications

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:28 PM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.