Blink Documentation

Author: Alex Uhlmann
Last Modified: 09/23/05 19:43:20


Summary

Blink class:

- description

Blink Properties:

- movieclip
- duration
- callback

Blink Methods:

- blinkInterval
- blinkTimes
- blinkFast
- animationStyle
- stop
- pause
- resume
- lock
- unlock
- isTweening
- getDurationElapsed
- getDurationRemaining
- addEventListener
- removeEventListener
- removeAllEventListeners
- eventListenerExists
- getID
- toString


Blink class

version: Documentation not provided.

description:

Let a movieclip blink.

usage:

var myBlink:Blink = new Blink(mc);

parameters:


Blink Properties:

movieclip

(MovieClip) Movieclip to animate.

duration

(Number) Duration of animation in milliseconds or frames. Default is milliseconds.

callback

(String) Function to invoke after animation. See APCore class.


Blink Methods:

blinkInterval

description: Every interval, the movieclip will be invisible and visible again till speed expires. This process stops when duration of animationStyle expires.

Example 1: Every second the movieclip is 100 milliseconds invisible. Lasts for 10 seconds.

				var myBlink:Blink = new Blink(mc);
				myBlink.animationStyle(10000);
				myBlink.blinkInterval(1000,100);
				

usage:

myBlink.blinkInterval(interval);
myBlink.blinkInterval(interval, speed);

parameters:

returns: void

blinkTimes

description: Force the number of blinks in a specified time and optionally specify the time the movieclip will be invisible.

Example 1: (Example .swf) let a movieclip blink 10 times in 10 seconds. Each blink the movieclip will be invisible for 500 milliseconds.

				var myBlink:Blink = new Blink(mc);
				myBlink.animationStyle(10000);
				myBlink.blinkTimes(10, 50);
				

usage:

myBlink.blinkTimes(interval);
myBlink.blinkTimes(interval, speed);

parameters:

returns: void

blinkFast

description: blinks a movieclip as fast as possible for a certain amount of time or frames. Uses the frame-based ImpulsDispatcher for maximum speed. High frame rates recommended. Doesn't support durationMode MS in frame-based tweening. In general, where preciseness is an issue you shouldn't use durationMode MS in frame-based tweening.

Example 1: (Example .swf) let a movieclip blink as fast as possible for one second (default). Frame rate is 31.

				var myBlink:Blink = new Blink(mc);
				myBlink.blinkFast()
				

usage:

myBlink.blinkFast(duration);

parameters:

returns: Void.

animationStyle

description: set the animation style properties for your animation.

usage:

myBlink.animationStyle(duration);
myBlink.animationStyle(duration, 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 or frames since the current tween started tweening.

usage: myInstance.getDurationElapsed();

returns: Number

getDurationRemaining

description: returns the remaining time or frames 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:

myBlink.addEventListener(event, listener);
myBlink.addEventListener(event, listener, handler);

parameters:

returns: Void.

removeEventListener

description: Removes a listener from a subscribed event.

usage:

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

parameters:

returns: Void.

removeAllEventListeners

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

usage:

myBlink.removeAllEventListeners();
myBlink.removeAllEventListeners(event);

parameters:

returns: Void.

eventListenerExists

description: GDispatcher specific feature. Checks if a listener is already subscribed to a certain event.

usage:

myBlink.eventListenerExists(event, listener);
myBlink.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