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";
39 var front
= document
.getElementById("front");
40 var back
= document
.getElementById("back");
44 widget
.prepareForTransition("ToFront");
47 back
.style
.display
= "none";
48 front
.style
.display
= "block";
52 setTimeout("widget.performTransition();", 0);
56 var flipShown
= false;
68 function mousemove(event
)
72 if (animation
.timer
!= null)
74 clearInterval(animation
.timer
);
75 animation
.timer
= null;
78 var starttime
= (new Date
).getTime() - 13;
80 animation
.duration
= 500;
81 animation
.starttime
= starttime
;
82 animation
.firstElement
= document
.getElementById("flip");
83 animation
.timer
= setInterval("animate();", 13);
84 animation
.from
= animation
.now
;
91 function mouseexit(event
)
95 // fade in the flip widget
96 if (animation
.timer
!= null)
98 clearInterval (animation
.timer
);
99 animation
.timer
= null;
102 var starttime
= (new Date
).getTime() - 13;
104 animation
.duration
= 500;
105 animation
.starttime
= starttime
;
106 animation
.firstElement
= document
.getElementById("flip");
107 animation
.timer
= setInterval("animate();", 13);
108 animation
.from
= animation
.now
;
120 var time
= (new Date
).getTime();
122 T
= limit_3(time
- animation
.starttime
, 0, animation
.duration
);
124 if (T
>= animation
.duration
)
126 clearInterval (animation
.timer
);
127 animation
.timer
= null;
128 animation
.now
= animation
.to
;
132 ease
= 0.5 - (0.5 * Math
.cos(Math
.PI
* T
/ animation
.duration
));
133 animation
.now
= compute_next_float(animation
.from
, animation
.to
, ease
);
136 animation
.firstElement
.style
.opacity
= animation
.now
;
140 function limit_3 (a
, b
, c
)
142 return a
< b
? b
: (a
> c
? c
: a
);
145 function compute_next_float(from
, to
, ease
)
147 return from
+ (to
- from
) * ease
;
150 function enterflip(event
)
152 document
.getElementById("fliprollie").style
.display
= "block";
155 function exitflip(event
)
157 document
.getElementById("fliprollie").style
.display
= "none";
160 /*=====================================================================*\
161 || ###################################################################
164 || ###################################################################
165 \*=====================================================================*/