Shake Documentation

Author: Documentation not provided.
Last Modified: 09/23/05 19:45:21


Summary

Shake class:

- description

Shake Properties:

- movieclip

Shake Methods:

- run
- stop
- pause
- resume
- lock
- unlock
- isTweening
- getDurationElapsed
- getDurationRemaining
- addEventListener
- removeEventListener
- removeAllEventListeners
- eventListenerExists
- getID
- toString


Shake class

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:


Shake Properties:

movieclip

(MovieClip) Movieclip to animate.


Shake Methods:

run

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

stop

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.

pause

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.

resume

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.

lock

description: locks the animation to prevent pausing, resuming and stopping. Default is unlocked.

usage: myInstance.lock();

returns: Void.

unlock

description: unlocks the animation to allow pausing, resuming and stopping. Default is unlocked.

usage: myInstance.unlock();

returns: Void.

isTweening

description: checks if the instance is currently animated.

usage: myInstance.isTweening();

returns: true if instance is tweening, false if instance is not tweening.

getDurationElapsed

description: returns the elapsed time in milliseconds since the current tween started tweening.

usage: myInstance.getDurationElapsed();

returns: Number

getDurationRemaining

description: returns the remaining time in milliseconds since the current tween started tweening.

usage: myInstance.getDurationRemaining();

returns: Number

addEventListener

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.

removeEventListener

description: Removes a listener from a subscribed event.

usage:

myShake.removeEventListener(event, listener);
myShake.removeEventListener(event, listener, handler);

parameters:

returns: Void.

removeAllEventListeners

description: GDispatcher specific feature. Removes all listeners for a specific event, or for all events.

usage:

myShake.removeAllEventListeners();
myShake.removeAllEventListeners(event);

parameters:

returns: Void.

eventListenerExists

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.

getID

description: returns a unique ID of the instance. Usefull for associative arrays.

usage: myInstance.getID();

returns: Number

toString

description: returns the name of the class.

usage: myInstance.toString();

returns: String




generated with AS2docGenerator beta 0.5.3