4 Replies Latest reply on Oct 28, 2009 12:23 PM by frist44

    Facebox in Flash

    frist44

      I would like to create an AJAX style pop up to present photos from a flash movie. I found a tutorial, but it didn't work for me. I'm trying to trigger it off the gerURL function of a button, but nothing popups. I have verified that a simple link in <a> from the html page the flash movie is on works fine, so it's just the call from flash itself.

       

      Any suggestions?

       

      Thanks,

      Brandon

        • 1. Re: Facebox in Flash
          Ned Murphy Adobe Community Professional & MVP

          I have no familiarity with the type of interface you are trying to present (by name), but here are some possible solutions:

           

          1)  If the html code is able to produce the desired result, then you could use External Interface to have Flash call the html page's function.  Here's a link regarding that for AS2 and As3.

           

          http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15683

           

          2) If the popup is like any other popup, then here's a link that discusses a variety of ways to open content in both AS2 and AS3:

           

          http://kb2.adobe.com/cps/141/tn_14192.html

          1 person found this helpful
          • 2. Re: Facebox in Flash
            frist44 Level 1

            I went with lightbox because there seemed to be more material about it. I tried this:

             

            http://blog.codefidelity.com/?p=18

             

            I used the javascript function in the my html:

             

            <script type="text/javascript">
            function GroupDelegate(id) {
               var objLink = document.getElementById(id);
               Lightbox.prototype.start(objLink);
            }
            </script>

             

            And then called it from the flash using this:

             

            getURL("javascript:GroupDelegate('photo')");

            However, my whole screen turns white and i don't see anything. I added a normal <a> link to my html and the light box works fine, so I'm thinking it has something to do with the flash.

            any thoughts?

            Brandon
            • 3. Re: Facebox in Flash
              Ned Murphy Adobe Community Professional & MVP

              I suggest looking into the first suggestion I offered, where you will use ExternalInterface to have Flash call that javascript function.

              • 4. Re: Facebox in Flash
                frist44 Level 1

                I get the same behavior: an all white screen as though something is popping up covering the movie.

                 

                import flash.external.*;
                stop();


                //Next Button click even
                btnPics.onRelease = function() {
                    //getURL("javascript:window.open('somePage.html','thewin','height=400,width=600,toolbar=n o,scrollbars=no')");
                    //getURL("javascript:GroupDelegate('photo1')");
                    ExternalInterface.call("GroupDelegate('photo1')");
                }