;

PDA

Click to See Complete Forum and Search --> : Lightbox 2 and 3dfa


ifmuth
06-06-2008, 04:02 PM
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.

Leo Cavalcante
06-07-2008, 02:34 PM
try this:
put a javascript in your html page
<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:
javascript:SWFDelegate('url','width','height','cap tion');

Zoranan
06-09-2008, 05:30 PM
Wish I could understand what you 2 are talking about, lol