A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Lightbox 2 and 3dfa

  1. #1
    Junior Member
    Join Date
    Nov 2003
    Location
    Ann Arbor
    Posts
    26

    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.

  2. #2
    Member
    Join Date
    Nov 2007
    Location
    Brazil
    Posts
    47
    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');
    []'s
    leocavalcante.com

  3. #3
    Senior Member Zoranan's Avatar
    Join Date
    May 2008
    Posts
    126
    Wish I could understand what you 2 are talking about, lol

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center