Front and Center!

Worked out a couple of tight little scripts to center content to your Flash movie. Check it, check it!

2 Replies to “Front and Center!”

  1. Here is some code I just tossed together:

    Stage.align = “TL”;
    Stage.scaleMode = “noScale”;

    Stage.addListener(Stage);

    Stage.onResize = function(){
    if(this.intervalId == null){
    this.intervalId = setInterval(this, “fireOnResize”, this.interval);
    }
    }

    Stage.fireOnResize = function(){
    this.broadcastMessage(“onResizeInterval”);
    clearInterval(this.intervalId);
    delete this.intervalId;
    }

    Stage.setIntervalTime = function(interval){
    this.interval = interval;
    }

    Stage.setIntervalTime(300);

    Stage.addListener(this);

    function onResizeInterval(args){
    trace(“Resized”);
    }

  2. A lot phatter. That was the interval trick I was talking about to make her a lot more processor friendly. Thanks a lot, yo, this is great!

Comments are closed.