At 11/11/05 03:35 PM, -liam- wrote:
At 11/11/05 03:34 PM, ImpotentBoy2 wrote:
oh you meant the entire code, well no i cant. but this doesnt have to be called along with an interval.
its just
shakeScreen(time,power)
for more convienience
Yes, but if you have any other onEnterFrame functions on the _root then they won't work =\
_global.shakeScreen = function(period:Number, strength:Number) {
(_root.t = 0, startX = _root._x, startY = _root._y, _root.createEmptyMovieClip("screenShaker", _root.getNextHighestDepth()));
_root.screenShaker.onEnterFrame = function() {
(_root._x = random(strength) - (strength / 2) + startX, _root._y = random(strength) - (strength / 2) + startY, _root.t++, _root.t > period ? (_root._x = startX, _root._y = startY, _root.onEnterFrame = undefined) : null);
};
};
shakeScreen(10, 10);
BAM!
At 11/11/05 03:35 PM, lucozadedude wrote:
fuck, i mean impotentboy, lol i saw -Toast-'s post and instantly thought 'oooooh, toast :)' and now my dog has fallen asleep over my arm... must.... type.... i bookmarked this so thanks :)
BAM BAM!!