Artists Effects Functions in MRlib

© 2012, Martin Rinehart

Note: These functions are the ones used to create the Artists track, Effects topic on this website. The exception is the "flash" effect which is not supported. (View Source on the flash page, if you must.)

show_div()

show_div( div, millis );

Flash not supported. Shows div for millis milliseconds. (Designed for divs, any other element should work, too.) Because of seizure issues for some viewers, you may wish to redesign to use fades or other non-violent effects.

glimmer()

glimmer( elem, max_opacity, millis_up, millis_down, millis_delay );

Glimmer: show dreamily. Designed to lead the viewer on with a "Did I really see that?" feeling.

Does nothing for millis_delay. Increases element's opacity from 0.0 (invisible) through max_opacity over millis_up milliseconds, then reduces opacity back to zero over millis_down milliseconds.

hover()

hover( trig_id, div_id );

Finds elements that have ids trig_id and div_id. (Throws errors if not found.) Hover over trig_id element displays div_id element.

popup()

popup( trig_id, div_id );

Popup: show with close button(s). Similar to a hover() but does not stop showing the target element when the hover ends. The target element remains visible. (Give it a close button so the viewer can get rid of it.)

With a hover() the viewer cannot use the mouse (to click a link, for example) on the target element. When the mouse is moved over the target, it leaves the hover trigger so the target disappears. The popup() removes this restriction.

shake()

shake( element, left, top, millis, millis_delay );

A shake() waits for millis_delay and then moves the target element from 0, 0 to left, top and back to 0, 0 over a total of millis milliseconds.

swell()

swell( element, width_start, height_start, width_end, height_end, millis, millis_delay );

Waits for millis_delay and then morphs element from starting size to ending size and then back again, over a total of millis> milliseconds.


Feedback: MartinRinehart at gmail dot com

# # #