11 Replies Latest reply on Oct 17, 2006 6:32 PM by kglad

    Object with actionscript not working on Mac

    PFWD
      I am fairly experienced with Dreamweaver and Fireworks, but a newbie to Flash. My first attempt at using Flash is basically a modification of the tutorial that comes with Flash for creating an FMA. You can see mine at http://www.perfectfitweb.com/testing/lightimages/www/lightimages.html. I used the actionscript in the tutorial and modified it to suit my needs. It works beautifully on my Windows XP and Windows 98 machines using IE 6 and Firefox 1.5.0.1. Unfortunately, it does not work on my client's machine (embarrassing). He is on a Mac and when I looked at it with him, the first picture would show up, but clicking on the Next button wouldn't do anything. I put in Flash detection to offer alternates if it was an older version of Flash or had scripts turned off. After trying that, the client emailed me, "I still could not get it to work. I thought it might have something to do with the Flash Player, so I re-installed the newest version, but it still didn’t work with either IE (v 5.2) or Safari (v 2.0.4). I also tried it with Firefox (v 1.5.0.6), but only the text appeared (no window at all)."

      Could someone out there try it on your Mac, tell me if it works, and give me any ideas why it won't work for him?
        • 1. Re: Object with actionscript not working on Mac
          kglad Adobe Community Professional & MVP
          do you know the player version your client is using?
          • 2. Object with actionscript not working on Mac
            PFWD Level 1
            I had him go to http://www.adobe.com/products/flash/about/ and it says he has:

            Macintosh - OS X (Intel) Firefox, Opera, Safari 9,0,20,0
            • 3. Re: Object with actionscript not working on Mac
              kglad Adobe Community Professional & MVP
              what's the code on your next button?
              • 4. Re: Object with actionscript not working on Mac
                PFWD Level 1
                I have a layer called "actions" with this script. Keep in mind it works on my Windows machines with Firefox 1.5.0.1 and IE 6.

                var image0uri:String = "images/homepage0.jpg";
                var image1uri:String = "images/homepage1.jpg";
                var image2uri:String = "images/homepage2.jpg";
                var image3uri:String = "images/homepage3.jpg";
                var image4uri:String = "images/homepage4.jpg";
                var image5uri:String = "images/homepage5.jpg";
                var image6uri:String = "images/homepage6.jpg";
                var image7uri:String = "images/homepage7.jpg";
                var image8uri:String = "images/homepage8.jpg";
                var image9uri:String = "images/homepage9.jpg";

                var currImage:Number = 0;
                var totalImages:Number = 10;

                for (var i:Number = 0; i<totalImages; i++) {
                slideShow_mc.slides_mc["holder"+i].loadMovie(this["image"+(i)+"uri"],slideShow_mc.slides_m c.getNextHighestDepth());
                }

                slideShow_mc.slides_mc["holder10"].loadMovie(this["image0uri"],slideShow_mc.slides_mc.getN extHighestDepth());
                slideShow_mc.slides_mc["holder11"].loadMovie(this["image1uri"],slideShow_mc.slides_mc.getN extHighestDepth());
                // function for the Next button
                function nextMenuItem(eventObj:Object) {

                slideShow_mc.gotoAndPlay("slide"+(currImage));
                if ((currImage+1)>=totalImages) {
                currImage = 0;
                } else {
                currImage++;
                }

                }
                // add the event listener for the button
                next_btn.addEventListener("click", nextMenuItem);
                • 5. Re: Object with actionscript not working on Mac
                  PFWD Level 1
                  While you are looking at this, I have one more minor question about it:
                  In Windows, it makes you click on the object first, THEN you can click on the Next button. So if the user tries clicking on the Next button, nothing happens (it just selects the object). They have to clcik the button a second time to make it work. Is there a way to select the object when the page loads? (I am using Dreamweaver, by the way).
                  • 6. Re: Object with actionscript not working on Mac
                    kglad Adobe Community Professional & MVP
                    you're using a button component? are you using other components?
                    • 7. Re: Object with actionscript not working on Mac
                      PFWD Level 1
                      The layers I have are:
                      - actions (has the above action script)
                      - Buttons (just the Next button, called next_btn)
                      - Border (the frame image around the center wedding image)
                      - greyArea (transparent boxes on either side of the frame to show greyed out versions of the next and last wedding images)
                      - slideShow (just like the tutorial that came with Flash for creating the FMA, this is a library item with its own timeline and is made up of an instance of "slides" which is multiple instances of "imageholder".)
                      • 8. Re: Object with actionscript not working on Mac
                        PFWD Level 1
                        New information: It occurred to me to upload the html file that Flash produces itself and have my client try viewing that, instead of my webpage where I incorporated in the flash object. He was able to view the version Flash exported!!! That means the problem lies in my web page. So, I am working on rebuilding the page to see if I can catch what is causing the problem. Could some CSS be the problem? I will work on it more in the morning.
                        • 9. Re: Object with actionscript not working on Mac
                          kglad Adobe Community Professional & MVP
                          the problem is due to some issue related to the way different browsers interpret html code. one of the major advantages of flash is that it's browser independent. once you start tinkering with the html code you start losing that advantage.
                          • 10. Re: Object with actionscript not working on Mac
                            PFWD Level 1
                            Problem solved! I found a friend who let me use his Mac for a few hours and I was able to isolate the problem. I had some CSS relative positioning and z-index that the Mac just didn't like. I took that out and now it works fine. Thank you for your help. Sorry it turned out not to be a Flash problem at all.
                            • 11. Re: Object with actionscript not working on Mac
                              kglad Adobe Community Professional & MVP
                              you're welcome.