Results 1 to 6 of 6

Thread: Two questions re lightbox and flash

  1. #1
    Join Date
    Apr 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Two questions re lightbox and flash

    1) Script Title: lightbox

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...box2/index.htm

    3) Describe problem: G'day guys,

    Firstly, has anyone figured out how to use lightbox 2 inside Flash yet? Would be nice, because the current way I'm doing it (using lightbox 1 inside Flash) doesn't allow me to add hyperlinks to the caption text.

    Secondly, I can't figure out how to get rid of the "click to activate" thing for my swf without breaking lightbox - does anyone know how to fix this?

    Cheers!

    Watto

  2. #2
    Join Date
    Apr 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Bump

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Your question doesn't make much sense. I don't see how disabling the 'click to activate' feature of Flash could possibly affect anything in the .swf itself. Also, most people want to put the .swf in lightbox, not the other way around as you seem to be asking.

    If you really are putting lightbox in .swf, this would be more of a Flash than a DD script question anyway. And, if you are, how?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Apr 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    G'day mate,

    Thanks for your reply! Gather you haven't heard of flashlightbox or flashlightbox2? It's a way of launching lightbox using buttons in Flash. You can check it out here - http://www.huddletogether.com/projects/lightbox/

    Anyway, believe me when I tell you, when I add the code I usually use for disabling "click to activate" the lightbox breaks. The reason I posted here is that I don't think it's a Flash problem - it's when I add the code to the html page that there's a problem.

    Here is the working page (using the technique explained in the flashlightbox download):

    Code:
    <html xmlns="http://www.w3.org/1999/xhtml " xml:lang="en" lang="en">
    <head> 
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    <title>Simon Watson Design</title> 
    <style type="text/css"> 
    @import "lightbox.css";
    img { border:0; }
    </style>
    <script type="text/javascript" src="lightbox.js "></script>
    </head>
    <body bgcolor="#ffffff">
    <p>&nbsp;</p>
    <p align="center"> 
    <!--url's used in the movie-->
    <!--text used in the movie-->
    <!-- saved from url=(0013)about:internet --> 
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="720" height="520" id="Design" align="middle"> 
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="movie" value="design-site.swf" /><param name="quality" value="high" /> <param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /><embed src="design-site.swf" quality="high" wmode="transparent" bgcolor="#f6f6f4" width="720" height="520" name="Design" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage=" http://www.macromedia.com/go/getflashplayer " />
    </object>
    </p>
    </body>
    </html>
    ...and here's the broken page:

    Code:
    <html xmlns="http://www.w3.org/1999/xhtml " xml:lang="en" lang="en">
    <head> 
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    <title>Simon Watson Design</title> 
    <style type="text/css"> 
    @import "lightbox.css";
    img { border:0; }
    </style>
    <script type="text/javascript" src="lightbox.js "></script>
    </head>
    <body bgcolor="#ffffff">
    <p>&nbsp;</p>
    <p align="center"> 
    <!--url's used in the movie-->
    <!--text used in the movie-->
    <!-- saved from url=(0013)about:internet --> 
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="720" height="520" id="Design" align="middle"> 
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="movie" value="design-site.swf" /><param name="quality" value="high" /> <param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /><embed src="design-site.swf" quality="high" wmode="transparent" bgcolor="#f6f6f4" width="720" height="520" name="Design" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage=" http://www.macromedia.com/go/getflashplayer " />
    </object>
    <script type="text/javascript" src="fixit.js"></script>
    </p>
    </body>
    </html>
    ...and lastly, here's the js I'm using for the click to activate thing (which works fine, but breaks lightbox):

    Code:
    theObjects = document.getElementsByTagName("object");
    for (var i = 0; i < theObjects.length; i++) {
    theObjects[i].outerHTML = theObjects[i].outerHTML;
    }
    Sorry about the long post! Here are the pages if you want to compare them:

    http://design.simonwatson.com.au/index.html

    http://design.simonwatson.com.au/index2.html

    As you can see, the first one has working lightbox, but you have to click to activate, whereas the second page has a broken lightbox, with NO click to activate.

    Appreciate your help and patience!


  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That outerHTML fix is one of the least reliable. Try this one:

    Code:
    <html xmlns="http://www.w3.org/1999/xhtml " xml:lang="en" lang="en">
    <head> 
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    <title>Simon Watson Design</title> 
    <style type="text/css"> 
    @import "lightbox.css";
    img { border:0; }
    </style>
    <script type="text/javascript" src="lightbox.js "></script>
    </head>
    <body bgcolor="#ffffff">
    <p>&nbsp;</p>
    <p align="center"> 
    <!--url's used in the movie-->
    <!--text used in the movie-->
    <!-- saved from url=(0013)about:internet --> 
    <noscript>
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="720" height="520" id="Design" align="middle"> 
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="movie" value="design-site.swf" /><param name="quality" value="high" /> <param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /><embed src="design-site.swf" quality="high" wmode="transparent" bgcolor="#f6f6f4" width="720" height="520" name="Design" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage=" http://www.macromedia.com/go/getflashplayer " />
    </object>
    </noscript>
    <script type="text/javascript" src="design-site.js"></script>
    </p>
    </body>
    </html>
    Then, in design-site.js have this code:

    Code:
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="720" height="520" id="Design" align="middle"> \n\
    <param name="allowScriptAccess" value="sameDomain" \/>\n\
    <param name="movie" value="design-site.swf" \/><param name="quality" value="high" \/> <param name="wmode" value="transparent" \/><param name="bgcolor" value="#ffffff" \/><embed src="design-site.swf" quality="high" wmode="transparent" bgcolor="#f6f6f4" width="720" height="520" name="Design" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage=" http://www.macromedia.com/go/getflashplayer " \/>\n\
    <\/object>');
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Apr 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Mate, you're a legend - worked beautifully!!!

    Thank you!!!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •