firing lightbox from flash button

Discussion in 'Web Design and Development' started by captainmeowtron, Oct 6, 2009.

  1. captainmeowtron macrumors member

    Joined:
    Dec 1, 2008
    #1
    I've tried a number of bits and pieces turned up on Google, but none of them are working. What I have is a swf file full of thumbnails. I want the thumbnails to fire lightbox. Here's what I've got:
    In the html document
    Code:
    <html>
    <head>
    <title>the black chamber</title>
    <script src="prototype.js" type="text/javascript"></script>
    <script src="scriptaculous.js?load=effects" type="text/javascript"></script>
    <script src="lightbox.js" type="text/javascript"></script>
    <link href="lightbox.css" rel="stylesheet" type="text/css" media="screen" />
    </head>
    <body bgcolor="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="1200" height="700">
    	<param name="movie" value="narratives1.swf">
    	<param name="quality" value="high">
    	<param name="bgcolor" value="#000000">
    	<embed name="narratives1" src="narratives1.swf" width="1200" height="700" quality="high" bgcolor="#000000" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
    </object>
    </body>
    </html>
    and what I'm putting on the buttons in Flash
    Code:
    on (release) {
    	getURL("nothing can be protected.jpg\" rel=\"lightbox\" title=\"caption");
    }
     
  2. Ride9650 macrumors 6502

    Joined:
    Jun 29, 2007
    #2
    well first off, you really should say which Actionscript version you're using, I was thrown off for a bit until I looked up the function.

    Secondly, for the URL, you have to use absolute urls, for instance
    getURL("http:www.adobe.com");

    Lastly, the function doesn't support HTML attributes. Thats why the lightbox script won't work. Flash and HTML, for the most part can't be mixed together. From what I've read, you can at least embed HTML into Flash files, but the extent of that is pretty limited.
     

Share This Page