CS4, AS2: Calling Lightbox from button
I'm working on a website www.designrd.com/ayla/
I am basically attempting to call up Lightbox 2 from the 'VIEW GALLERY' button in the swf as you can't make the whole swf a hyperlink..
The button has this code on it
Code:
on(release)
{
getURL("javascript:show('images/image1.jpg')");
}
and within the HTML I have this code
Code:
<a id="dummyanchor" href="" rel="lightbox"></a>
JAVASCRIPT:
function show(url) {
var a = document.getElementById('dummyanchor');
a.setAttribute('href',url);
myLightbox.start(a);
}
this was the best sounding solution I had found as given by 'under' on this page.
http://www.huddletogether.com/forum/...iscussionID=99
If there are an easier/other ways of doing this I am open to suggestion, I'm essentially trying to get a button within an SWF to call up Lightbox 2