Page 3 of 6 FirstFirst 12345 ... LastLast
Results 21 to 30 of 55

Thread: Call lightbox from a flash file with buttons?

  1. #21
    Join Date
    Jul 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    As the need of having this automated is not that weird, I've created a javascript class which sits between the swf and lightbox that automates it all.

    Project Page : http://www.bram.us/projects/flashlightboxinjector/
    Demo Page : http://www.bram.us/demo/projects/flashlightboxinjector/

    Have fun!
    Bramus!

  2. #22
    Join Date
    Jun 2007
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hey Bramus!, that's really awesome! but i can't get it to work at all! I added the ID tag to all the images as well as uploaded and added the js file in the html and then put ....

    import flash.external.*;

    btn_editorial.onRelease = function() {
    ExternalInterface.call("myFlashLightBoxInjector.start", "editorial1");
    }

    into the flash actions and nothing!! is there more to it? Your instructions seem to suggest not.

    Also I have 3 buttons on my page with 3 seperate protfolios that i need to work. I couldn't see how to make that happen. I couldn't even get one to work so... I don't know....

    you know I was trying to do something very similar to your example which is awesome, but that got scraped.
    Quote Originally Posted by Bramus! View Post
    As the need of having this automated is not that weird, I've created a javascript class which sits between the swf and lightbox that automates it all.

    Project Page : http://www.bram.us/projects/flashlightboxinjector/
    Demo Page : http://www.bram.us/demo/projects/flashlightboxinjector/

    Have fun!
    Bramus!
    Last edited by Charlene1; 07-29-2007 at 07:59 PM.

  3. #23
    Join Date
    Jun 2007
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    well nevermind Medyman - it actually seems to be working. It appears that the reason I couldn't get it to work in IE with that code is that IE was cacheing the swf file. So i kept refreshing and it wasn't working when it really kept trying to read the same swf file from a new html file. HAH! URGH! (I feel a little stupid - heh)

    Works now! You're brilliant Medyman!! Thank you again!!
    Last edited by Charlene1; 07-29-2007 at 08:00 PM.

  4. #24
    Join Date
    Jul 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Charlene1 View Post
    Hey Bramus!, that's really awesome! but i can't get it to work at all! I added the ID tag to all the images as well as uploaded and added the js file in the html and then put ....

    import flash.external.*;

    btn_editorial.onRelease = function() {
    ExternalInterface.call("myFlashLightBoxInjector.start", "editorial1");
    }

    into the flash actions and nothing!! is there more to it? Your instructions seem to suggest not.
    edit the start function of myFlashLightBoxInjector to do an alert of some sort to see if it actually gets called. And sure your id's (on the a elements) are set correctly?

    Quote Originally Posted by Charlene1 View Post
    Also I have 3 buttons on my page with 3 seperate protfolios that i need to work. I couldn't see how to make that happen. I couldn't even get one to work so... I don't know....
    Same method as above should be used, just make sure your HTML output of your a elements have the right rel set to support sets (rel="lightbox[set1]", rel="lightbox[set2]", etc.)

  5. #25
    Join Date
    Aug 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi ,

    Concerning Flash & Lightbox 2, It doesn't work for me...

    I tried the same scripts

    --------head / HTML :
    <link rel="stylesheet" href="LB/css/lightbox.css" type="text/css" media="screen" />
    <script type="text/javascript" src="LB/js/prototype.js"></script>
    <script type="text/javascript" src="LB/js/scriptaculous.js?load=effects"></script>
    <script type="text/javascript" src="LB/js/lightbox.js"></script>

    <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>

    --------body / HTML :
    <object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
    type="application/x-shockwave-flash" data="btn.swf" width="150" height="70">
    <param name="movie" value="btn.swf" />
    <param name="wmode" value="transparent" />
    <param value="high" name="quality" />
    <embed src="btn.swf" wmode="transparent"></embed>
    </object>

    <a href="LB/images/bisounours.jpg" rel="lightbox"
    title="Description de l'image 1"></a>

    ----------In flash, the button :
    on (release) {
    getURL("javascript:LightboxDelegate('LB/images/bisounours.jpg' , 'Description de l'image 1')");
    }

    Can you help me ? Thank you so much !
    Last edited by SAB++; 08-09-2007 at 04:35 PM. Reason: mistake

  6. #26
    Join Date
    Jun 2007
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by SAB++ View Post
    Hi ,

    Concerning Flash & Lightbox 2, It doesn't work for me...

    I tried the same scripts

    }

    Can you help me ? Thank you so much !
    read the rest of this thread - we all had problems with this code. the code medyman posted in the end works perfectly!. There's also the "flash injector" someone created and posted about in this thread.

  7. #27
    Join Date
    Aug 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default flash buttons linking to separate galleries using lightbox 2.3

    I'm trying to figure out the needed actionscript code for my flash button if im using the following lightbox code.

    <script type="text/javascript">
    function LightboxDelegate1(url,caption) {
    var objLink = document.createElement('a');
    objLink.setAttribute('href',url);
    objLink.setAttribute('rel','lightbox[dailynews]');
    objLink.setAttribute('title',caption);
    Lightbox.prototype.start(objLink);
    }
    </script>

  8. #28
    Join Date
    Aug 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I'm trying to figure out the needed actionscript code for my flash
    button(s) if im using the following lightbox code. i want each button to
    open its own group of images.

    Thanks a trillion

    <script type="text/javascript">
    function LightboxDelegate1(url,caption) {
    var objLink = document.createElement('a');
    objLink.setAttribute('href',url);
    objLink.setAttribute('rel','lightbox[dailynews]');
    objLink.setAttribute('title',caption);
    Lightbox.prototype.start(objLink);
    }
    </script>

    <script type="text/javascript">
    function LightboxDelegate2(url,caption) {
    var objLink = document.createElement('a');
    objLink.setAttribute('href',url);
    objLink.setAttribute('rel','lightbox[music]');
    objLink.setAttribute('title',caption);
    Lightbox.prototype.start(objLink);
    }

    my testing page ...
    </script>http://www.meanwhiledesign.net/test.html
    Last edited by dynamicfalcon; 08-19-2007 at 10:49 PM. Reason: more details

  9. #29
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    You didn't read the whole topic before you posted.

    I first posted the LightboxDelegate JS in hopes that i would work. It did in some of my testing but other people have had problems with it in IE.

    I then reworked a solution and again posted it here. You can see it at: http://www.dynamicdrive.com/forums/s...t.php?p=102522

    If you're still having problems. Feel free to post back.

  10. #30
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Scott...

    I emailed you back.

Bookmarks

Posting Permissions

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