Solved

disable ctrl-p for a page contain .swf

Posted on 2004-04-22
7
867 Views
Last Modified: 2012-06-21
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
Comment
Question by:mirsim
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 36

Expert Comment

by:Zyloch
ID: 10892706
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
 

Author Comment

by:mirsim
ID: 10892781
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
 
LVL 6

Expert Comment

by:dgelinas
ID: 10893107
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 36

Expert Comment

by:Zyloch
ID: 10903407
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
 

Author Comment

by:mirsim
ID: 10917647
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
 
LVL 36

Expert Comment

by:Zyloch
ID: 10923000
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
 
LVL 36

Accepted Solution

by:
Zyloch earned 125 total points
ID: 10933336
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question