Blink Documentation
Author: Alex Uhlmann
Last Modified: 09/23/05 19:43:20
Summary
Blink class:
Blink Properties:
Blink Methods:
version: Documentation not provided.
description:
Let a movieclip blink.
usage:
var myBlink:Blink = new Blink(mc);parameters:
(MovieClip) Movieclip to animate.
(Number) Duration of animation in milliseconds or frames. Default is milliseconds.
(String) Function to invoke after animation. See APCore class.
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
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
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.
description: set the animation style properties for your animation.
usage:
myBlink.animationStyle(duration);
myBlink.animationStyle(duration, 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 or frames since the current tween started tweening.
usage: myInstance.getDurationElapsed();
returns: Number
description: returns the remaining time or frames 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:
myBlink.addEventListener(event, listener);
myBlink.addEventListener(event, listener, handler);
parameters:
returns: Void.
description: Removes a listener from a subscribed event.
usage:
myBlink.removeEventListener(event, listener);
myBlink.removeEventListener(event, listener, handler);
parameters:
returns: Void.
description: GDispatcher specific feature. Removes all listeners for a specific event, or for all events.
usage:
myBlink.removeAllEventListeners();
myBlink.removeAllEventListeners(event);
parameters:
returns: Void.
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.
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