Pano viewer in a table cell - How to?

  • I have produced my first KP Pano. Works great.
    However I want to create a convential html page and display panos within the cells of a table. EG at the bottome of a page.

    Say for example a 3 row, 3 column table. I would like to show a pano in row 2, column 1 and/or another pano in say row 3, column 2....
    It is a simple request & task but I have failed miserably to achieve even getting one pano in a cell, let alone two!

    How to please...

    Thanks

    (I am using Dreamwaver CS4)

  • Thank you, Klaus...
    I was putting everything in the cell... not just the div!

    I'm having fun with KRpano. I am in the process of converting some existing flat panos into the Flash player but now realise I need more hardware fo sphericals! *cry*

    I will need to save up for a NN5...

  • I have followed your instructions but I cannot get it to work in a cell of a table by putting the 'div' into the cell. I must be doing something wrong. *confused*
    The following is the code WITHOUT table & works perfectly in full page & full screen:


    However, when I add a 3 x 3 table and move only the div (into the centre cell of this example) as per the following code:


    All I get is a black screen with a white table and NO Flash pano as per:


    What am I doing wrong???? *confused*

  • try this i may be wrong. make a div inside the table cell then put all krpano stuff inside that div.

    <table width="750" border="1" cellspacing="1" cellpadding="1">
    <tr>
    <td><DIVNAME>

    <div id="krpanoDIV"><noscript><table width="100%" height="100%"><tr valign="middle"><td><center>ERROR:<br><br>Javascript not activated<br><br></center></td></tr></table></noscript>
    </div>
    <script type="text/javascript" src="swfobject/swfobject.js"></script>
    <script type="text/javascript" src="swfobject/swfkrpanomousewheel.js"></script>
    <script type="text/javascript">
    // <![CDATA[
    if (typeof(deconcept) !== 'undefined')
    {
    if (deconcept.SWFObjectUtil.getPlayerVersion().major >= 9)
    {
    var so = new SWFObject("krpano.swf","krpanoSWFObject","100%","100%","9.0.28","#000000");
    so.addParam("allowFullScreen","true");
    so.addVariable("xml", "IMG_5197westbury2400pxh.xml");
    if (so.write("krpanoDIV")) { var mousewheelfixes = new SWFkrpanoMouseWheel(so); }
    }
    else
    {
    document.getElementById("krpanoDIV").innerHTML = '<table width="100%" height="100%"><tr valign="middle"><td><center>ERROR:<br><br>Adobe Flash Player 9 needed<br><br><br><a href="http://www.adobe.com/go/getflashplayer/" target="_blank"><IMG SRC="http://www.macromedia.com/images/shared/…lash_player.gif" BORDER="1"></a><br>...click here to download...<br><br><br><br></center></td></tr></table>';
    }
    }
    else
    {
    document.getElementById("krpanoDIV").innerHTML = '<table width="100%" height="100%"><tr valign="middle"><td><center>ERROR:<br/><br/>swfobject.js not found<br/><br/></center></td></tr></table>';
    }
    // ]]>
    </script>

    </DIVNAME>td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>$nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    </table>

  • Hi

    Thank you for the reply and your efforts. It is much appreciated.

    Although there was a couple of minor syntax errors which I corrected, { a closing td as td> and a nonbreaking space as $nbsp }. Regretfully your idea did not work. All I get is the black screen & white table as per the image above. *confused*

    I tried as suggested by Klaus, just dragging the 'DIV' into a cell and got the black screen with white table. Dragging the same 'DIV' out from the cell, the flash pano works perfectly....

    I'm flumuxed!

    *question* *question* *question*

  • Hi Michel & Klaus

    Thanks for your replies
    I realised last night that I should have uploaded that & not the pano itself.

    Below is the link to the complete set of directory files (Excluding the licence file!)

    There are two html files...
    One marked ORIGINAL - this works perfectly, full page & full screen...
    The one marked TABLE has only the 'div' moved into the centre cell of a 3 x 3 and results in the black page with white table as per above...

    Click there to d/l wg.rar (15Mb)
    EDIT: The table page in the rar file has all the code in the cell...The link below has the 'div' only in the table cell.

    Click here to see online examples of the good & bad pages.

    Thanks
    Donald

    EDIT:
    Platform:
    quad core + 4GBram
    Vista Ultimate (32) + Flash Player v10

    Edited 2 times, last by DonaldG (September 16, 2009 at 8:29 AM).

  • @ Michel:
    My sincere thanks. I just tried it in Firefox & it worked perfectly just as I want it to. However, I must get it to work in all current versions of Internet Explorer.

    It appears there it may be some incompatability with Flash Pano Viewer or KRpano 1.0.8 when the pano is placed in a table cell that shows up in IE8.

    I did try to view it with flash 9(?) but it was the same as in Flash 10.

    The problem I have is that I am still very new to the concept of Flash panos & still in learning mode! *g*

    Perhaps Klaus can come up with a solution....

    @ vn2009: Thanks for the info - I didn't know that *smile*

  • Hi,

    It appears there it may be some incompatability with Flash Pano Viewer or KRpano 1.0.8 when the pano is placed in a table cell that shows up in IE8.

    no, this has nothing to do with krpano or flash,
    it's purely a HTML/Browser problem

    it seems the 100% width and height makes problem in Quircksmode (no DOCTYPE in the HTML):

    Code
    var so = new SWFObject("krpano.swf","krpanoSWFObject","100%","100%","9.0.28","#000000");

    try using a fixed size, e.g:

    Code
    var so = new SWFObject("krpano.swf","krpanoSWFObject","700","200","9.0.28","#000000");

    best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!