Effect.Shake = function (element) { element = $(element); var options = Object.extend({distance: 20, duration: 0.5}, arguments[1] || {}); var distance = parseFloat(options.distance); var split = parseFloat(options.duration) / 10; var oldStyle = {top: element.getStyle("top"), left: element.getStyle("left")}; return new (Effect.Move)(element, {x: distance, y: 0, duration: split, afterFinishInternal: function (effect) {new (Effect.Move)(effect.element, {x: - distance * 2, y: 0, duration: split * 2, afterFinishInternal: function (effect) {new (Effect.Move)(effect.element, {x: distance * 2, y: 0, duration: split * 2, afterFinishInternal: function (effect) {new (Effect.Move)(effect.element, {x: - distance * 2, y: 0, duration: split * 2, afterFinishInternal: function (effect) {new (Effect.Move)(effect.element, {x: distance * 2, y: 0, duration: split * 2, afterFinishInternal: function (effect) {new (Effect.Move)(effect.element, {x: - distance, y: 0, duration: split, afterFinishInternal: function (effect) {effect.element.undoPositioned().setStyle(oldStyle);if(typeof(options.afterFinish)=='function'){options.afterFinish()}}});}});}});}});}});}}); }
Scriptcaulous Effe.ctShake
Started by Noitidart, Jul 16 2010 11:39 AM
3 replies to this topic
#1
Posted 16 July 2010 - 11:39 AM
#2
Posted 16 July 2010 - 11:42 AM
So many closing brackets...lol
#3
Posted 16 July 2010 - 02:59 PM
Haha yeah it gets a little crazy to track all that.
#4
Posted 19 July 2010 - 11:30 AM
The brackets look like the non-vb version of part of a source of mine. Just like, 10ish lines of "End If" :I
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users