• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 870
  • Last Modified:

disable ctrl-p for a page contain .swf

i have an intranet with html page how contain swf animation.
i can control the print in the html page but when i give the focus to the swf animation i can print the page and it's content.
i want to know if it's possible to disable the print fonction (file print, ctrl-p) for this case.

thanks a lot.
0
mirsim
Asked:
mirsim
  • 4
  • 2
1 Solution
 
ZylochCommented:
I'm not sure what you want, but this page:

http://www.macromedia.com/support/flash/ts/documents/disable_printing.htm

if you can modify your Flash script, disables the print inside the Flash. This may work to disable the print option in Flash, but you probably can still use Ctrl+P.

You probably are disabling print in your HTML page using suppress right click and using onkeypress to check for Ctrl+P. Possibly you can check for that in your Flash script and suppress it, but otherwise, I dunno.

--Zyloch
0
 
mirsimAuthor Commented:
i try the trick of macromedia (!#p) but this solution don't disable the print of the html page by IE when the flash animation have focus.
0
 
dgelinasCommented:
You can't control File -> Print..

Maybe you can make an additional "Printer Friendly" page where you won't have to worry about the flash or graphics if that is the case.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
ZylochCommented:
dgelinas is right. You can use tricks to try to delay or make printing more difficult, but you can not really disable it. For instance, things you can do:

Use the !#p to prevent printing in Flash.
Disable Ctrl+P in browser with onkeypress.
Disable right menu or make your own without print.
Make a Printer Friendly page as dgelinas suggests.
Post a notice that you should print at the Printer Friendly page.

Most of the Internet users will not try to print your page if they can't use shortcuts (They can always use File->Print). The ones that are determined enough should be smart enough to use the Printer Friendly page.

--Zyloch
0
 
mirsimAuthor Commented:
Well,
this is the first part of my problem. The worst is that all that "very important" flash animation are in an intranet.
By default all pages open in fullscreen then, the user cannot print or desactivate the fullscreen mode because i catch the keypress.
My big problem is that if i click on a flash animation, the keypress aren't catchable anymore....
an my client says : " everyone can see the path an then go to the location and download the animation..."

What can i do for this ????
0
 
ZylochCommented:
It may be possible to put in your <BODY> tag:

<body onBlur="this.focus();">

This would be best if your Flash animation doesn't need the user to click or type anything. If the user only needs to click a button, this code may still work.

--Zyloch
0
 
ZylochCommented:
This might fail if the user rapid-clicks on the Flash, in this case, this may be more desirable:

<body onBlur="setTimeout('window.focus',100);">

I changed this.focus() to window.focus() because in my testing, window.focus() appeared to work faster and better.

--Zyloch
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now