
November 13th, 2002, 02:53 AM
|
|
Designer
|
|
Join Date: Jan 2002
Location: Netherlands
Posts: 104
Time spent in forums: 3 h 22 m 16 sec
Reputation Power: 7
|
|
Worked something out
I worked out a microsoft example cranked the speed up and added some stuff I wanted to do... The page is in the original MSDN Style Sheet so you have been warned  .
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>BlendTrans Transition</TITLE>
<META NAME="AUTHOR" CONTENT="InetSDK">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso8859-1">
<META NAME="MS.LOCALE" CONTENT="EN-US">
<META NAME="ROBOTS" CONTENT="noindex">
<SCRIPT>
<!--
function fadeOut(obj) {
obj.style.filter="blendTrans(duration=1)";
// Make sure filter is not playing.
if ((obj.visibility != "hidden")) {
obj.filters.blendTrans.Apply();
obj.style.visibility="hidden";
obj.filters.blendTrans.Play();
}
}
function fadeIn(obj) {
obj.style.filter="blendTrans(duration=1)";
// Make sure filter is not playing.
if ((obj.visibility != "visible")) {
obj.filters.blendTrans.Apply();
obj.style.visibility="visible";
obj.filters.blendTrans.Play();
}
}
-->
</SCRIPT>
<STYLE>
body{
margin:20;
background:white;
font-family:verdana;
font-size:80%;
}
.bar{
background:#336699;
width:100%;
height:30px;
border-top:1px solid #99CCFF;
border-bottom:1px solid #000000;
}
.title{
font-size:15pt;
color:white;
padding-left:10px;
}
a:link
{
text-decoration:none;
color:white
}
a:visited
{
text-decoration:none;
color:white
}
a:active
{
text-decoration:none;
color:white
}
a:hover
{
text-decoration:none;
color:yellow
}
</STYLE>
</HEAD>
<BODY STYLE="font-family:verdana; font-size:9pt">
<DIV CLASS="bar title">
BlendTrans Transition
</DIV>
<H3>This example shows how to create a fade effect with the <B>BlendTrans</B> transition.</H3>
<P>Click the buttons below the text to cause the text to fade in and out.</P>
<DIV ID="oDiv" STYLE="width:250; color:#CC00CC">This text can be faded in and out.</DIV>
<P>
<BUTTON onclick="fadeOut(oDiv)" STYLE="background-color: blue; color: white">Fade Text Out</BUTTON>
<BUTTON onclick="fadeIn(oDiv)" STYLE="background-color: blue; color: white">Fade Text In</BUTTON>
</P>
<P>Click the buttons below the image to cause the image to fade in and out.<BR/>
Wait until one transition is complete before reversing it.
</P>
<IMG ID="oImg" SRC="sphere.jpg" onMouseOver="fadeOut(oImg)" onmouseout="fadeIn(oImg)"></IMG>
<P>
<BUTTON onclick="fadeOut(oImg)" STYLE="background-color: red">Fade Image Out</BUTTON>
<BUTTON onclick="fadeIn(oImg)" STYLE="background-color: red">Fade Image In</BUTTON>
</P>
<table ID="tabel" width="500" border="0" cellspacing="2" cellpadding="0">
<tr>
<td ID="tabeltext" width="50%" onMouseOver="fadeOut(tabeltext)" onMouseOut="fadeIn(tabeltext)">Blaat dit roleert</td>
<td ID="tabelachtergrond" onMouseOver="fadeOut(tabelachtergrond)" onMouseOut="fadeIn(tabelachtergrond)" bgcolor="#0099FF"><div id="divje">Blauwe achtergrond! :)</div></td>
</tr>
</table>
<P>
<BUTTON onclick="fadeOut(tabel)" STYLE="background-color: green">Fade Table out</BUTTON>
<BUTTON onclick="fadeIn(tabel)" STYLE="background-color: green">Fade Table In</BUTTON>
</P>
<BR/>
<HR>
<P>[To view source code, right-click in the window.]</P>
</DIV>
<DIV CLASS="bar" STYLE=" padding:5px; padding-left:10">
Not copy righted by microsoft example heavily ****ed up by BadGuy
</DIV>
</BODY>
</HTML>
This is the sphere that is used. I just linked it to the original microsoft sphere
[edit]
(image tags don't work?)
[/edit]
Also note that I ripped out a check that looks if the transistion is going on. this will make it look a bit weird... but it works  and that's all that matters. Note the text also fades in the table so I haven't really done what I wanted but still I can just move a div over it with the text in it.
|