|
-
Lightbox not working :'(
Hey everybody,
I'm busy building a portfolio website and I want to use lightbox to open my images, but I can't seem to let it work! I've done this before, but it's a year ago and everything is a little blurry (also, I don't have my old .fla file anymore to see).
Anyway, I used the code from this site and I know that there are a lot different 'boxes' (like flashbox or greybox) but essentially they all work with same code. I just don't see what the problem is. Flash doesn't give any errors from the actionscript and as far as I see I've done exactly what the other website tells me. I've put all the files exactly where they should be, normal links do work, but maybe the actionscript>javascript link isn't right. 
here is what I have in my html:
Code:
<HTML>
<HEAD>
<TITLE>Petra's Illustrations</TITLE>
<script type="text/javascript">
function LightboxDelegate(url,caption) {
var objLink = document.createElement('a');
objLink.setAttribute('href',url);
objLink.setAttribute('rel','lightbox');
objLink.setAttribute('title',caption);
Lightbox.prototype.start(objLink);
}
</script>
</HEAD>
<BODY>
<center>
<body bgcolor="#000000">
<param name="movie" value="web2.swf">
<param name="allowScriptAccess" value="sameDomain" >
<param name="wmode" value="transparent">
<embed src="web2.swf" width="984" height="780"
wmode="transparent"
</embed>
</center>
</BODY>
</HTML>
And this is what linked my button (AS2):
Actionscript Code:
but_0.onRelease = function() { getURL("javascript:LightboxDelegate('http://petravanberkum.nl/art/0.jpg','Silent Sound')"); }
If this is a stupid mistake in any way, then please excuse me, for I'm still a flash newbie. I've tried to ask it on several forums, but nobody answers.
Also, I have read a lot of other options and have googled many times for solutions, but I can't find one.
I would really appreciate any kind of help!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|