• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 872
  • 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
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

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