5 Replies Latest reply on Jan 16, 2010 5:11 PM by kglad

    can't make Flash button work in firefox and safari


      I'm creating an Entry Page slideshow here with Flash Cs3 and AS2:



      I'd like to be able to click on the whole slideshow (or the "Enter Site" text) to go to another page on the site, which I'm calling "vaforestwild.com/home.html."  I've read various tutorials all day and tried many things, but couldn't seem to apply any "on release" action to the "Enter Site" text that would work.  I even created an invisible button (putting a keyframe on just the HIT state and deleting it from the UP state), named the instance "invbutton3", and then typed in this action on the first frame and inserted a keyframe at the end of the show:




      The cursor changes to a hand, but nothing happens when clicking on the show.  So I was experimenting with modifying the Object text in the head section of the index file where the slideshow is located and I stumbled on something that made the clickable link work in Internet Explorer, but not in Safari and Firefox.  I modified the object text to read like this:


      onfocus="MM_goToURL('parent','http://vaforestwild.com/home.html');return document.MM_returnValue"


      (Previously, it had http://vaforestwild.com/index.html and would just start the slideshow over if you clicked on it)


      Here is the entire <object> text:


      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" name="slideshow" width="945" height="400" id="slideshow" title="vfwg-slideshow" onfocus="MM_goToURL('parent','http://vaforestwild.com/home.html');return document.MM_returnValue">
                       <param name="movie" value="vfwg-entryshow2.swf" />
                       <param name="quality" value="high" />
           <embed src="vfwg-entryshow2.swf" width="945" height="400" name="slideshow" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"



      Can you help me do one of two things, either 1) modify the object text so the clickable link will go to that "home" page in all 3 browsers or 2) fix the slideshow action itself so the action script will work on the invisible button.


      I hope this isn't too confusing.  Thanks in advance for any help!


      --Deane Dozier

        • 1. Re: can't make Flash button work in firefox and safari
          kglad Adobe Community Professional & MVP

          your html embedding code is problematic.


          to verify that's the only problem, use flash to publish a html for your swf, upload your html and test in ff and safari.

          1 person found this helpful
          • 2. Re: can't make Flash button work in firefox and safari
            deanedozier Level 1

            Thank you so much for your help.


            I should have mentioned that I was unable to use the html file produced by Flash Cs3 in any browser because I get the message "this page requires AC_RunActiveContent.js".  I'll be happy to work with it if you think it's best.  Here is the uploaded html file followed by the code in the file:




            <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
            <script language="javascript">AC_FL_RunContent = 0;</script>
            <script src="AC_RunActiveContent.js" language="javascript"></script>
            <body bgcolor="#003333">
            <!--url's used in the movie-->
            <!--text used in the movie-->
            <!-- saved from url=(0013)about:internet -->
            <script language="javascript">
            if (AC_FL_RunContent == 0) {
              alert("This page requires AC_RunActiveContent.js.");
            } else {
               'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
               'width', '945',
               'height', '400',
               'src', 'vfwg-entryshow2',
               'quality', 'high',
               'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
               'align', 'middle',
               'play', 'true',
               'loop', 'true',
               'scale', 'showall',
               'wmode', 'window',
               'devicefont', 'false',
               'id', 'vfwg-entryshow2',
               'bgcolor', '#003333',
               'name', 'vfwg-entryshow2',
               'menu', 'true',
               'allowFullScreen', 'false',
               'movie', 'vfwg-entryshow2',
               'salign', ''
               ); //end AC code
            <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="945" height="400" id="vfwg-entryshow2" align="middle">
            <param name="allowScriptAccess" value="sameDomain" />
            <param name="allowFullScreen" value="false" />
            <param name="movie" value="vfwg-entryshow2.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#003333" /> <embed src="vfwg-entryshow2.swf" quality="high" bgcolor="#003333" width="945" height="400" name="vfwg-entryshow2" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />


            Since the html page didn't work, I tried dragging the swf file into my index page and Dreamweaver automatically produced the "embed object" text that I pasted in my previous email.  Incidentally, I was mistaken when I said that text was in the head section.  It wasn't, it was in the body. Here's the script code in the head section:


            <script type="text/JavaScript">
            function MM_goToURL() { //v3.0
              var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
              for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");


            Okay, so now I have produced a test page to work on here:



            I started over by letting Dreamweaver create the object text again, and here's what I have (script in the head is the same as above) The only change I made is in the size of the width and height, which Dreamweaver thought was 32x32 :


            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="945" height="400">
              <param name="movie" value="vfwg-entryshow2.swf" />
              <param name="quality" value="high" />
              <embed src="vfwg-entryshow2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="945" height="400"></embed>


            I believe my problem is most likely related to how I'm applying action to my button in Flash. I find the tutorials somewhat confusing and I am unable to do exactly what the tutorials say, even though the writers specify they are using AS2.  I'm going to be continuing to try different things and I'll report back if I am successful.  In the meantime, if you have any suggestions based on the information I've provided, I would love to hear them.  Thank you!


            Deane Dozier

            • 3. Re: can't make Flash button work in firefox and safari
              kglad Adobe Community Professional & MVP

              flash also published that  AC_RunActiveContent.js file.  upload that to your server and retest.

              1 person found this helpful
              • 4. Re: can't make Flash button work in firefox and safari
                deanedozier Level 1

                Thank you for pointing out that I needed to upload the js file!  I had never noticed that it was created by Flash too.


                The button was still not working when I did that, so I deleted the button layer and action layer in Flash and started over with another tutorial.  I was able to create a simple file with a button that worked by using one from the common library, so that helped me back up and see where my homemade buttons were different from the ones from the common libraries, and I finally learned how to name the instance and convert it to a button, combining the rectangle and the text together in one symbol. I made a huge "hit" area so that the entire slideshow box is a clickable link to the "home" website page.  This time, I also created a separate layer for the actions instead of applying the action on the button layer itself, and am not sure if that contributed to making it work, but now it does work!


                Thank you again for assisting me!  I'm sure I'll be back with some other problem in the future.


                --Deane Dozier