0 Replies Latest reply on Feb 20, 2008 4:11 AM by neilcowley

    ActionScript for centered object -

    neilcowley
      this is my testing URL: http://neilcowley.com/gallery/scaling-b7.html

      I'm positioning a SlideShowPro object on the stage using this actionscript:

      var stageListener:Object = new Object ();
      stageListener.onResize = positionContent;
      Stage.addListener(stageListener);
      function positionContent():Void {
      ncssp._x = Stage.width / 2 - 940 / 2;
      ncssp._y = Stage.height - 690;
      header._y = 10
      header._x = Stage.width / 2 - header._width / 2;
      }
      positionContent();

      the ncssp instance is the slideshow - header is the movieclip with the three buttons and my signature

      The problem is that the window size can be smaller than the instance of the slideshow - and thus with the centering math I've used the instance will slide up above the buttons and well it's weird. What would be a good technique to position it?