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!”
Comments are closed.
Software, Fitness, and Gaming – Jesse Warden
Software | Fitness | Gaming
Worked out a couple of tight little scripts to center content to your Flash movie. Check it, check it!
Comments are closed.
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”);
}
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!