Page 2 of 6 FirstFirst 1234 ... LastLast
Results 11 to 20 of 55

Thread: Call lightbox from a flash file with buttons?

  1. #11
    Join Date
    Jun 2007
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    DId you get your lightbox working in IE medyman? (just curious) I've found 3 ppl now with the same problem of this working in every browser except IE, but can not find a solution. Unfortunately I have an understand in of AS, but not js at all!

    If you found a solution to share, you would make our month!!

    Thanks in advance, and thanks again for all your solid advice thus far!!

    Quote Originally Posted by Medyman View Post
    Yes, seek a javascript expert. It has to be something with the Javascript (which I know very little about).

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

    Default

    Hey Charlene...

    I actually never used this technique. I'm not sure what could be causing the incompaibitly in IE.

    Again, I'm going to refer you the JS forum for some help with this issue. Sorry that I can't help more.

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

    Default

    Oh sorry - i misread your post. It does say you were "planning" on using this for your website I thought I read that you had and was grasping at straws.

    Both i and the other person on this thread have posted on the JS forum, no luck as of yet. If i find something, I'll post it here though!!

    Thanks for your quick reply! Hope your redesign is going well!
    Quote Originally Posted by Medyman View Post
    Hey Charlene...

    I actually never used this technique. I'm not sure what could be causing the incompaibitly in IE.

    Again, I'm going to refer you the JS forum for some help with this issue. Sorry that I can't help more.

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

    Default

    I was going to use the lightbox but I decided to go in another direction. As I also stated, I'm very indecisive when it comes to my own website.

    You might be able to find some answers here: http://www.huddletogether.com/forum/

  5. #15
    Join Date
    Jul 2007
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Photoguy1601

    I want to create something similar to what you have interms of lightbox to show my portfolio, how can I create something similar to what you have? I just need my flash sits portfolio to open a image over my flash site and be abl to hit next to the other images.

    Could you please advice as to how I can achieve this

    thanx

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

    Default

    Charlene, Photoguy:

    I actually changed my plans (again) and now am using lightBox on my website. I was able to make it work perfectly in IE as well as other browsers.

    If you still need some help, I'd be happy to share my code with you.


    Shush:
    Read the beginning of this thread. I've explained exactly how to do this. The first step would be to get lighbox working without flash and then move onto flash and JS interaction.

    Post back if you have any questions.

  7. #17
    Join Date
    Jun 2007
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    oh yes, please share! What did you do?

    oMG - I've been searching and searching!! I'm so excited!

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

    Default

    Sorry for the delay. The last few days have been hectic. Here is a working example. I've tested in IE7, IE6, FF, IE/Mac, Safari, FF/Mac. It works beautifully.

    Here is the live demo.
    All of the source files are zipped and uploaded here.

    This example is used for an online portfolio. There is a looping slideshow with three images. The expand button starts the lightbox script. I didn't get the change to make a dedicated demo so this is the page, as is (or more like was.) I'll include the relevant coding below. You can download the full source code in the zip file posted above.

    Note: Pay attention to the portfolio.js file.

    ActionScript 2.0
    Code:
    expand.onRelease = function() {
    	getURL("javascript:show(1)");
    }
    HTML
    HTML Code:
    <html>
    <head>
    <title>Designs by Vishal</title>
    <script type="text/javascript" src="js/prototype.js"></script>
    <script type="text/javascript" src="js/scriptaculous.js?load=effects"></script>
    <script type="text/javascript" src="js/lightbox.js"></script>
    <script type="text/javascript" src="js/portfolio.js"></script>
    
    <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
    
    
    </head>
     
    <body>
    
    
    		<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="919" height="300" id="Designs by Vishal" align="middle">
    		<param name="allowScriptAccess" value="sameDomain" />
    		<param name="movie" value="portfolio/Designs by Vishal.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="portfolio/Designs by Vishal.swf" quality="high" bgcolor="#ffffff" width="919" height="300" name="Designs by Vishal" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
    		</object>
    		
    	<div id="script">
    		<a id="dbv1" href="images/portfolio/dbv/screenshots/1.jpg" rel="lightbox[dbv]" title="Designs by Vishal"></a>
    		<a id="dbv2" href="images/portfolio/dbv/screenshots/2.jpg" rel="lightbox[dbv]" title="Designs by Vishal"></a>
    		<a id="dbv3" href="images/portfolio/dbv/screenshots/3.jpg" rel="lightbox[dbv]" title="Designs by Vishal"></a>
    	</div>
    	
    	
    	
    </body>
    </html>
    JS
    Code:
    function show(image) {
    var a = document.getElementById("dbv"+image+"");
    var f = new Array()
    f[1] = "images/portfolio/dbv/screenshots/1.jpg";
    f[2] = "images/portfolio/dbv/screenshots/2.jpg";
    f[3] = "images/portfolio/dbv/screenshots/3.jpg";
    var url = f[image];
    a.setAttribute('href', url);
    myLightbox.start(a);
    }

    Hope this helps you all out. Post any more questions, I'll try to be of help.

  9. #19
    Join Date
    Jun 2007
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You are a STAR!!! Thank you thank you!!!

  10. #20
    Join Date
    Jun 2007
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ok - i got one of the links working and was super happy. Now my problem is getting more that one button on a page with different portfolios working.

    I put the js directly into the html (like the example in previous posts for more than one) and renamed each function matching what each button calls the js function in as. It worked great in FF! but to no avail in IE - it will read the first js but not the next ones??? Any ideas?

    here's what i have thus far...
    Code:
    <script type="text/javascript" src="js/prototype.js"></script>
    <script type="text/javascript" src="js/scriptaculous.js?load=effects"></script>
    <script type="text/javascript" src="js/lightbox.js"></script>
    <script type="text/javascript" src="js/swfobject.js"></script>
    
    <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
    
    <script type="text/javascript">
    function portfolio(image) {
    var a = document.getElementById("editorial"+image+"");
    var f = new Array()
    f[1] = "images/eyes1.jpg";
    f[2] = "images/eyes2.jpg";
    f[3] = "images/eyes3.jpg";
    var url = f[image];
    a.setAttribute('href', url);
    myLightbox.start(a);
    }
    </script>
    
    <script type="text/javascript">
    function showb(image) {
    var a = document.getElementById("identity"+image+"");
    var f = new Array()
    f[1] = "images/CB-Logo.jpg";
    f[2] = "images/empireyellow.jpg";
    f[3] = "images/empirered.jpg";
    var url = f[image];
    a.setAttribute('href', url);
    myLightbox.start(a);
    }
    </script>
    
    </head>
    
    <body bgcolor="#808160">
    
    <div id="script">
    <a id="editorial1" href="images/eyes1.jpg" rel="lightbox[editorial]" title="Editorial"></a>
    <a id="editorial2" href="images/eyes2.jpg" rel="lightbox[editorial]" title="Editorial"></a>
    <a id="editorial3" href="images/eyes3.jpg" rel="lightbox[editorial]" title="Editorial"></a>
    <a id="identity1" href="images/CB-Logo.jpg" rel="lightbox[identity]" title="Charlene Burris - logo"></a>
    <a id="identity2" href="images/empireyellow.jpg" rel="lightbox[identity]" title="Empire S.C. - logo"></a>
    <a id="identity3" href="images/empirered.jpg" rel="lightbox[identity]" title="Empire S.C. - logo"></a>
    </div>
    
    <script type="text/javascript"> 
    var so = new SWFObject("home2.swf", "flashmovie", "990", "520", "8", "#808160"); 
    so.addParam("movie", "home2.swf");
    so.addParam("quality", "high");
    so.addParam("bgcolor", "#808160");
    so.addParam("align", "t");
    so.addParam("allowScriptAccess", "always"); 
    so.write("flashcontent");
    </script>
    and the as obviously
    Code:
    on (release) {
    	getURL("javascript:portfolio(1)");
    }
    on (release) {
    	getURL("javascript:showb(1)");
    }

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
  •