Not signed in (Sign In)

Vanilla 1.0.3 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthoribarral
    • CommentTimeMar 15th 2007
     
    Hello,

    I have a problem: when I print a page that have an SWF movie embedded with SWFObjet in Firefox 2.0, the space of the movie is white (nothing prints). Is there any way to solve this problem or print the alternative content?

    Thanks!
    Nacho
    • CommentAuthornatureboi
    • CommentTimeMar 18th 2007
     
    Nacho, does this happen even if you right click on the movie and use that print command?
    • CommentAuthorGeoff
    • CommentTimeMar 20th 2007
     
    this isn't a swfobject issue, it's a general flash issue. you should use flash's print functions if you want to print flash.
    • CommentAuthor036
    • CommentTimeMay 24th 2007
     
    Can we print the alternative html part instead of printing flash movie?
    • CommentAuthorphilip
    • CommentTimeMay 24th 2007 edited
     
    the alt HTML is lost when SWFObject replaces it.

    to print the alt HTML i think you'd hotrod SWFObject to hide the original content (instead of replace via SWFObject) then use CSS to show/hide DIVs based on media type (print, screen, etc.). this isn't recommended.

    you can build print functionality into Flash, but it may have conflicts with HTML content on other portions of the page.
    http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001760.html
    • CommentAuthor036
    • CommentTimeMay 29th 2007
     
    Thank you, philip! That is what I wanted to know. For now, I will make "print" button in flash which links to plain html with css for print;)
  1.  
    • CommentAuthorphilip
    • CommentTimeOct 1st 2007 edited
     
    Brent asked:
    is there any way to have your alternate content print automatically when someone prints a page? This may not be possible, but maybe there's a way with javascript? I haven't been able to find any onPrint built in functions or any way to use the print stylesheet to show the alt content... Any ideas?

    response:

    the only way to get it to work is to have alt content remain in your document after loading the SWF, then use a print-specific CSS doc to show or hide specific page elements when printing.

    the catch here is that SWFObject is designed to replace the alt content with the SWF.

    an easy workaround might be to use two DIVs instead of one:

    <div id="altContent">Hello!</div>
    <div id="flash"></div>

    declare SWFObject like normal:

    var so = new SWFObject ...

    use conditionals to hide the altContent div:

    if(so.write("flash")){
    document.getElementById("altContent").style.display = "none";
    }

    then use 'print'-specific CSS to specify that altContent should be visible when printing and flash should be hidden:

    <style media="print" type="text/css">
    <!--
    #altContent {
    display: block;
    }

    #flash {
    display: none;
    }
    -->
    </style>


    - philip
    • CommentAuthorHen
    • CommentTimeOct 10th 2007
     
    Make sure it's

    #altContent { display: block !important }

    or else the javascript that hides it initially will overrule it!
    • CommentAuthorphilip
    • CommentTimeOct 13th 2007
     
    thanks for the tip :)
  2.  
    I’ve uploaded source code for solving the problem with flash content printing in Firefox and an example of its usage in Flash.
    FFPrintFix library was extended and now it is called ACPrintManager. Now it is not only bug fix for printing, but also content control for printing from a browser.

    see http://www.anychart.com/blog/2007/10/27/ac-print-manager/