You are here: Re: Disable printing of flash in favour of internal content « HTML « IT news, forums, messages
Re: Disable printing of flash in favour of internal content

Posted by Neo Geshel on 03/21/07 16:31

John Hosking wrote:
> cwdjrxyz wrote:
>> On Mar 16, 11:58 am, Neo Geshel <got...@geshel.org> wrote:
>>
>>>
>>> <object id="head" type="application/x-shockwave-flash"
>>> data="/swf/header.swf" width="758" height="200">
>>> <param name="allowScriptAccess" value="sameDomain" />
>>> <param name="movie" value="/swf/header.swf" />
>>> <param name="quality" value="high" />
>>> <param name="bgcolor" value="#ffffff" />
>>> <h1><a href="/">Generic Corp</a></h1>
>>> </object>
>>>
>>> Simply put, when a browser goes to print, or provides a print preview, I
>>> want it to ignore the object element completely, in favour of the h1
>>> element inside of the object (the object's alternative, or "graceful
>>> degradation" content).
>>>
>>> That is, I *DO NOT* want the object element to show up on either the
>>> print preview, or the actual print output at all. It should be as if the
>>> object element doesn't even exist. However, I *DO* want the object's
>>> "graceful degradation" content, the h1 (present for those who do not
>>> have Flash installed) to show up in the print preview AND the print
>>> output.
>>>
>>
>> I suggest that you make a second page that appears as you want it for
>> printing out. Then just link to it from the main page for those who
>> want to print. The print page would have your header instead of the
>> flash display, and anything else that would make the printed page look
>> better.
>
> Does there have to be a completely separate page? Bend CSS to your will
> (assuming it's working in your users' browsers in the first place)?
>
> In the XHTML:
> <head>
> <link rel="Stylesheet" href="MyStyle.css" type="text/css" media="screen">
> <link rel="Stylesheet" href="MyStylePrint.css" type="text/css"
> media="print">
>
> <object blah blah...>
> <h1 class="flashthingy">Our company is dynamic</h1>
>
> In MyStyle.css:
> object#head {visibility:visible;}
> h1.flashthingy {display:none;}
>
> In MyStylePrint.css:
> object#head {visibility:hidden;}
> h1.flashthingy {display:block;}
>
> Whether you use visibility or display to hide the Flash object depends
> on its position and spacing relative to other elements. When I use CSS
> to hide a nav menu when printing, I often use visibility:hidden so as to
> preserve the layout. Sometimes, though, it's preferable to completely
> /hide/ the nav menu (display:none;) to /not/ preserve the layout. You'll
> have to study your design and see.
>
> Caveat: not sure this will work for you, so try it and test it well. I
> have no clue regarding <h1> or other texts in Flash objects so cannot
> help you (Neo) directly.
>
> HTH. GL.

The problem with this method is with people who have flash disabled, or
who have an alternative user-agent. Those without flash or with an
older, incompatible version of flash, will not see any type of header at
all, because there is no <h1> inside the <object>. However, if we were
to put two on the page - one inside the object for those that cannot use
the object element, and one outside for print purposes - those who
cannot use the object element and go to print out the page will see two
headers.

I can see many situations where either no headers, or both headers would
be seen. This would not be a good situation. Besides, I am trying to
implement a semantically correct way of doing this; and that means that
only one <h1> can and will exist on the page.

In fact, the only thing that I think *might* work is sIFR
(http://www.mikeindustries.com/sifr/), as it allows the <h1> to exist
all by itself, and dynamically adds the flash if and only if the user
has the right version of flash installed. Problem is, it seems you
cannot specify pre-made flash files... it’s meant as a rich text tool
that dynamically reads what is inside the tagged element, and renders it
as fancily-formatted flash text (your own desired font, which the end
user doesn’t necessarily have).

Thanks, anyways.
...Geshel
--
*********************************************************************
My return e-mail address is an automatically monitored spam honeypot.
Do not send e-mail there unless you wish to be reported as a spammer.
Please send all e-mail to my first name at my last name dot org, with
a subject-line of “NEWSGROUP REPLY FOR NEO GESHEL” (all uppercase).
*********************************************************************

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация