I would like to have alternate behavior during a print stylesheet on a web page. Something along the lines of:
If this page is being printed, don’t bother calling SWFObject to summon an .swf into existence. Just leave the HTML that the Flash will replace.
I’ve tried things like setting a known element to a known style that exists for the screen but not for the print stylesheet. But getting a ‘style’ via Javascript doesn’t get a computed style.
Summary: In a cross-browser way, is it possible to tell which stylesheet is in effect?
It sounds like you’re confused that print style-sheets are used when you view a printer-friendly page, but that is not the case. A print style sheet isn’t applied until the user actually sends the page to the printer. At this point, any javascript that is going to run has already finished.
What you want to do is put your SWFObject inside a div container, and have the container styled as
display:none;for the print media.