-
Lightbox 2 and 3dfa
Hi everyone. I'm using some script which overlays an image on a current page. It's nice and I've only used plain html links to activate it. But appears it can be used to open images even when the link is within a flash file.
Here's the basic script and some examples
http://www.lokeshdhakar.com/projects/lightbox2/#how
As you can see, it's just a matter of adding a rel"" attribute to your hyperlink script.
Now, I'm wondering if I can do this with 3dfa and how. I want it to activate when clicking a button. So on -Button Down- this pops up.
-
try this:
put a javascript in your html page
Code:
<script type="text/javascript">
function SWFDelegate(url,width,height,caption) {
var objLink = document.createElement('a');
objLink.setAttribute('href',url);
objLink.setAttribute('rel','lightbox');
objLink.setAttribute('title',caption);
if(typeof width != 'undefined') {
objLink.setAttribute('width',width);
}
if(typeof height != 'undefined') {
objLink.setAttribute('height',height);
}
Lightbox.prototype.start(objLink);
}
</script>
And in 3DFA you put this in an OpenURL:
Code:
javascript:SWFDelegate('url','width','height','caption');
-
Wish I could understand what you 2 are talking about, lol