인터넷정보

이미지 체인징

알 수 없는 사용자 2007. 10. 18. 14:01
<script language="JavaScript">
<!--
var picture1="http://oxtag.com/html/img/banner3.gif"
var picture2="http://oxtag.com/html/img/banner4.gif"

var picturewidth=90
var pictureheight=30
//-->
</script>


<script language="JavaScript">
<!--
if (document.all) {
document.write('<OBJECT ID="DAControl_Wipe" ')
document.write('STYLE="width:'+picturewidth+';height:'+pictureheight+'"')
document.write('CLASSID="CLSID:B6FFC24C-7E13-11D0-9B47-00C04FC2F51D">')
document.write('</OBJECT>')
m = DAControl_Wipe.MeterLibrary;
whatTransformation = new ActiveXObject("DXImageTransform.Microsoft.Wipe");

whatPictures = new Array();
whatPictures[0] = m.ImportImage(picture1);
whatPictures[1] = m.ImportImage(picture2);


forward = m.Interpolate(0, 1, 5);
back = m.Interpolate(1, 0, 5);
whatMovement = m.Sequence(forward, back).RepeatForever();

whatTransformation.GradientSize = 1.0;
whatTransformation.WipeStyle = 0;

theResult = m.ApplyDXTransform( whatTransformation, whatPictures, whatMovement );

DAControl_Wipe.Image = theResult.OutputBvr;
DAControl_Wipe.Start();

}
//-->
</script>


- 설명 -


사용될 이미지 주소를 집어넣는다

var picture1="http://oxtag.com/html/img/banner3.gif"
var picture2="http://oxtag.com/html/img/banner4.gif"


이미지의 가로 세로 크기

var picturewidth=90
var pictureheight=30

이미지가 바뀔 때 오른쪽과 왼쪽 방향의 속도이며 숫자가 클수록 느려진다

forward = m.Interpolate(0, 1, 5);
back = m.Interpolate(1, 0, 5);
반응형