0 Replies Latest reply on Oct 4, 2010 8:56 PM by ogre11

    swf behaves very differently on mac and windows

    ogre11 Level 1

      swf runs swimmingly on in Windows, screws up on mac.


      I've been passing an fla back and forth with a designer. When I run the swf on my Windows 7 machine at home it works perfectly, but when we run it on his OSX machine it screw up.


      The main issue revolves around a couple parts that rely on a event listener. It almost seems like when it runs in OSX the event doesnt always fire?


      Initially he had CS3, but upgraded to CS5 and the same problems stayed. Any known problems like this? Crossposting this in the Adobe forums as well.


      here's the code that sets the listener (sorry for the formatting, it was this or crazy wide from working on a wide screen monitor)



      var portLoader:Loader = Loader(parent.parent['portLoader']);


      var theSite:MovieClip;


      theSite = MovieClip(Loader(parent.parent['portLoader']).content);


      trace('the site is ' + theSite.name);


      var theNav = theSite['customNav'];




      var redrawingNav:Boolean = false;


      function onRedraw(e:Event)
          redrawingNav = false;



      and here's the code that throws the event- just a function that draws a set of thumbnails by looping over some xml and creating a bunch of custom classes. There's nothing there that would cause the function to return before the event is dispatched.

      public function draw():void
                  //var images:XMLList = album.children();
                  var images:XMLList = xml.album[currentAlbum].img;
                  var album:XML = xml.album[currentAlbum];//new XML(xml.album[0]);
                  var curPos:int = 0;
                  if(numChildren > 0)
                      for(var xx:int = numChildren - 1; xx >= 0; xx--)
                  for(var i:int = 0; i < images.length(); i++)
                      var image:XML = new XML(images[i]);
                      //trace(album.attribute('tnPath') + image.attribute('src'));
                      var tnPath:String = image.attribute('tn').length() == 0 ?
                                              album.attribute('tnPath') + image.attribute('src') : album.attribute('tnPath') + image.attribute('tn');
                      var imageShell:SSPCustomNavThumb = new SSPCustomNavThumb(tnPath,getThumbProperties());
                      if(navOrientation == 'vertical')
                          imageShell.y = curPos;
                          curPos += getThumbProperties().height + thumbMargin;
                          imageShell.x = curPos;
                          curPos += getThumbProperties().width + thumbMargin;
                      //events and such
                      imageShell.useHandCursor = true;
                      imageShell.buttonMode = true;
                  dispatchEvent(new Event(SSPCustomNav.DRAW));