Shake Documentation
Author: Documentation not provided.
Last Modified: 09/23/05 19:45:21
Summary
Shake class:
Shake Properties:
Shake Methods:
version: Documentation not provided.
description:
Shakes a movieclip with a specified power, optional specified rotation in a specified time.
Example 1: shakes a movieclip 1 second with little power and without rotation.
new Shake(mc).run(.1,2000);
Example 2: (Example .swf) shakes a movieclip with a little more power and a little rotation 2 seconds long. Then, shake it harder but without rotation. Both shake animations have a Trail effect attached.
new Trail(mc).attach(250,40,4000);
new Shake(mc).run(.2,2000,2,"onCallback");
myListener.onCallback = function() {
new Shake(mc).run(.8,2000);
}
usage:
var myShake:Shake = new Shake(mc);parameters:
description: Shakes a movieclip with a specified power, optional specified rotation in a specified time.
usage:
myShake.run(power, milliseconds, rot[, callback]);
myShake.run(power, milliseconds[, callback]);
parameters:
returns: void
description: stops the animation if not locked.
usage: myInstance.stop();
returns: true if instance was successfully stopped.
false if instance could not be stopped, because it was locked.
description: pauses the animation if not locked. Call resume() to continue animation.
usage: myInstance.pause();
parameters:
returns: true if instance was successfully paused.
false if instance could not be paused, because it was locked.
description: continues the animation if not locked.
usage: myInstance.resume();
returns: true if instance was successfully resumed.
false if instance could not be resumed, because it was locked.
description: locks the animation to prevent pausing, resuming and stopping. Default is unlocked.
usage: myInstance.lock();
returns: Void.
description: unlocks the animation to allow pausing, resuming and stopping. Default is unlocked.
usage: myInstance.unlock();
returns: Void.
description: checks if the instance is currently animated.
usage: myInstance.isTweening();
returns: true if instance is tweening,
false if instance is not tweening.
description: returns the elapsed time in milliseconds since the current tween started tweening.
usage: myInstance.getDurationElapsed();
returns: Number
description: returns the remaining time in milliseconds since the current tween started tweening.
usage: myInstance.getDurationRemaining();
returns: Number
description: Subscribe to a predefined event. The following standard EventDispatcher events are broadcasted
onStart, broadcasted when animation starts.
onEnd, broadcasted when animation ends.
The even object returned, contains the following properties:
type (String) event broadcasted.
target (Object) event source.
usage:
myShake.addEventListener(event, listener);
myShake.addEventListener(event, listener, handler);
parameters:
returns: Void.
description: Removes a listener from a subscribed event.
usage:
myShake.removeEventListener(event, listener);
myShake.removeEventListener(event, listener, handler);
parameters:
returns: Void.
description: GDispatcher specific feature. Removes all listeners for a specific event, or for all events.
usage:
myShake.removeAllEventListeners();
myShake.removeAllEventListeners(event);
parameters:
returns: Void.
description: GDispatcher specific feature. Checks if a listener is already subscribed to a certain event.
usage:
myShake.eventListenerExists(event, listener);
myShake.eventListenerExists(event, listener, handler);
parameters:
returns: true if event exists on listener.
false if event doesn't exist on listener.
description: returns a unique ID of the instance. Usefull for associative arrays.
usage: myInstance.getID();
returns: Number
description: returns the name of the class.
usage: myInstance.toString();
returns: String