A. Bir animasyonun kaynak kodu
Önceki Web Sitesi Düzenlemesi ve Tasarımı Sonraki
A. Bir animasyonun kaynak kodu
<SCRIPT LANGUAGE="JavaScript">
function MM_timelinePlay(tmLnName, myID) { //v1.2
//Copyright 1997 Macromedia, Inc. All rights reserved.
var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,propNum,theObj,firstTime=false;
if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time
tmLn = document.MM_Time[tmLnName];
if (myID == null) { myID = ++tmLn.ID; firstTime=true;}//if new call, incr ID
if (myID == tmLn.ID) { //if Im newest
setTimeout('MM_timelinePlay("'+tmLnName+'",'+myID+')',tmLn.delay);
fNew = ++tmLn.curFrame;
for (i=0; i<tmLn.length; i++) {
sprite = tmLn[i];
if (sprite.charAt(0) == 's') {
if (sprite.obj) {
numKeyFr = sprite.keyFrames.length; firstKeyFr = sprite.keyFrames[0];
if (fNew >= firstKeyFr && fNew <= sprite.keyFrames[numKeyFr-1]) {//in range
keyFrm=1;
for (j=0; j<sprite.values.length; j++) {
props = sprite.values[j];
if (numKeyFr != props.length) {
if (props.prop2 == null) sprite.obj[props.prop] = props[fNew-firstKeyFr];
else sprite.obj[props.prop2][props.prop] = props[fNew-firstKeyFr];
} else {
while (keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm]) keyFrm++;
if (firstTime || fNew==sprite.keyFrames[keyFrm-1]) {
if (props.prop2 == null) sprite.obj[props.prop] = props[keyFrm-1];
else sprite.obj[props.prop2][props.prop] = props[keyFrm-1];
} } } } }
} else if (sprite.charAt(0)=='b' && fNew == sprite.frame) eval(sprite.value);
if (fNew > tmLn.lastFrame) tmLn.ID = 0;
} }
} function MM_initTimelines() {
//MM_initTimelines() Copyright 1997 Macromedia, Inc. All rights reserved.
var ns = navigator.appName == "Netscape";
document.MM_Time = new Array(1);
document.MM_Time[0] = new Array(1);
document.MM_Time["Timeline1"] = document.MM_Time[0];
document.MM_Time[0].MM_Name = "Timeline1";
document.MM_Time[0].fps = 15;
document.MM_Time[0][0] = new String("sprite");
document.MM_Time[0][0].slot = 1;
if (ns)
document.MM_Time[0][0].obj = document["Layer1"];
else
document.MM_Time[0][0].obj = document.all ? document.all["Layer1"] : null;
document.MM_Time[0][0].keyFrames = new Array(1, 8, 18, 28, 32, 38, 43, 47, 51, 53, 55);
document.MM_Time[0][0].values = new Array(4);
document.MM_Time[0][0].values[0] = new Array(25,32,38,45,52,60,69,80,89,99,109,120,132,144,156,169,183,197,212,228,244,260,276,291,306,320,333,346,369,387,402,413,419,422,424,425,423,419,409,395,380,365,350,333,316,301,286,273,263,255,248,242,244,256,271);
document.MM_Time[0][0].values[0].prop = "left";
document.MM_Time[0][0].values[1] = new Array(11,24,37,51,64,77,91,105,116,127,139,151,163,175,186,196,206,214,221,226,229,232,235,236,237,238,237,237,233,226,215,201,189,176,162,148,134,121,107,95,85,77,70,66,65,66,71,80,91,103,114,134,152,164,172);
document.MM_Time[0][0].values[1].prop = "top";
if (!ns) {
document.MM_Time[0][0].values[0].prop2 = "style";
document.MM_Time[0][0].values[1].prop2 = "style";
}
document.MM_Time[0][0].values[2] = new Array(150,157,164,171,178,185,192,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200);
document.MM_Time[0][0].values[2].prop = "width";
if (!ns)
document.MM_Time[0][0].values[2].prop2 = "style";
document.MM_Time[0][0].values[3] = new Array(50,59,68,77,87,96,105,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115);
document.MM_Time[0][0].values[3].prop = "height";
if (!ns)
document.MM_Time[0][0].values[3].prop2 = "style";
document.MM_Time[0].lastFrame = 55;
for (i=0; i<document.MM_Time.length; i++) {
document.MM_Time[i].ID = null;
document.MM_Time[i].curFrame = 0;
document.MM_Time[i].delay = 1000/document.MM_Time[i].fps;
}
}
</SCRIPT>
Önceki Üst Ana Başlık Sonraki
Bağlantılar Başlangıç B. Stres
Bir Linux Kitaplığı Sayfası