1 /*=====================================================================*\
2 || ################################################################### ||
3 || # RGB Converter Widget [#]version[#]
4 || # --------------------------------------------------------------- # ||
5 || # Copyright ©2002-[#]year[#] by Iris Studios, Inc. All Rights Reserved. # ||
6 || # This file may not be reproduced in any way without permission. # ||
7 || # --------------------------------------------------------------- # ||
8 || # User License Agreement at http://www.iris-studios.com/license/ # ||
9 || ################################################################### ||
10 \*=====================================================================*/
12 // ###################################################################
17 var front
= document
.getElementById("front");
18 var back
= document
.getElementById("back");
22 widget
.prepareForTransition("ToBack");
25 front
.style
.display
= "none";
26 back
.style
.display
= "block";
30 setTimeout("widget.performTransition();", 0);
33 document
.getElementById("fliprollie").style
.display
= "none";
38 var front
= document
.getElementById("front");
39 var back
= document
.getElementById("back");
43 widget
.prepareForTransition("ToFront");
46 back
.style
.display
= "none";
47 front
.style
.display
= "block";
51 setTimeout("widget.performTransition();", 0);
55 var flipShown
= false;
67 function mousemove(event
)
71 if (animation
.timer
!= null)
73 clearInterval(animation
.timer
);
74 animation
.timer
= null;
77 var starttime
= (new Date
).getTime() - 13;
79 animation
.duration
= 500;
80 animation
.starttime
= starttime
;
81 animation
.firstElement
= document
.getElementById("flip");
82 animation
.timer
= setInterval("animate();", 13);
83 animation
.from
= animation
.now
;
90 function mouseexit(event
)
94 // fade in the flip widget
95 if (animation
.timer
!= null)
97 clearInterval (animation
.timer
);
98 animation
.timer
= null;
101 var starttime
= (new Date
).getTime() - 13;
103 animation
.duration
= 500;
104 animation
.starttime
= starttime
;
105 animation
.firstElement
= document
.getElementById("flip");
106 animation
.timer
= setInterval("animate();", 13);
107 animation
.from
= animation
.now
;
119 var time
= (new Date
).getTime();
121 T
= limit_3(time
- animation
.starttime
, 0, animation
.duration
);
123 if (T
>= animation
.duration
)
125 clearInterval(animation
.timer
);
126 animation
.timer
= null;
127 animation
.now
= animation
.to
;
131 ease
= 0.5 - (0.5 * Math
.cos(Math
.PI
* T
/ animation
.duration
));
132 animation
.now
= compute_next_float(animation
.from
, animation
.to
, ease
);
135 animation
.firstElement
.style
.opacity
= animation
.now
;
138 function limit_3 (a
, b
, c
)
140 return a
< b
? b
: (a
> c
? c
: a
);
143 function compute_next_float(from
, to
, ease
)
145 return from
+ (to
- from
) * ease
;
148 function enterflip(event
)
150 document
.getElementById("fliprollie").style
.display
= "block";
153 function exitflip(event
)
155 document
.getElementById("fliprollie").style
.display
= "none";
158 /*=====================================================================*\
159 || ###################################################################
162 || ###################################################################
163 \*=====================================================================*/