UKAZKA ANIMACIE

ID
Nazov / Name:
Popis / Description:
Dlzka / Length:
Testovane pod / Tested under:

 

194
p194.html / p194.zip
Demonstracia pouzitia vrstiev
20087b
NN 4.04

UKAZKA / CLICK HERE

Zdrojovy tvar / Source code:

<HTML> <HEAD> <TITLE>PS STYLE DEMO</TITLE> <STYLE> .wel { font-family: times; font-size: 26px; color: #CC9933; position: absolute; top: 0px; left: 0px; visibility: hidden; z-index: 1; } A { color: #FFFFFF; } </STYLE> <SCRIPT LANGUAGE = "JavaScript"> <!-- function animatedObject(elementName,loop,speed,steps,endRoutines,route){ this.elementName = elementName; this.loop = loop; this.speed = speed; this.steps = steps; this.frameIndex = 0; this.endRoutines = endRoutines; this.route = route.split(','); this.animate = animateObject; this.move = moveObject; this.show = showObject; this.hide = hideObject; animatedObjects[elementName] = this; } function stopTimeline(timelineNumber){ animationTime[timelineNumber] = animationTimeline[timelineNumber].length; } function startTimeline(timelineNumber) { animationTime[timelineNumber] = 0; timelineController(timelineNumber); } function timelineController(timelineNumber) { if (animationTime[timelineNumber] <= animationTimeline[timelineNumber].length - 1) { animationTime[timelineNumber]++; if (animationTimeline[timelineNumber][animationTime[timelineNumber]] != null){ eval(animationTimeline[timelineNumber][animationTime[timelineNumber]]); } setTimeout('timelineController(' + timelineNumber + ')', 100); } } function showObject(){ eval(layerObj + '["' + this.elementName + '"]' + styleObj + '.visibility = "visible"'); } function hideObject(){ eval(layerObj + '["' + this.elementName + '"]' + styleObj + '.visibility = "hidden"'); } function moveObject(left, top){ eval(layerObj + '["' + this.elementName + '"]' + styleObj + '.top = top'); eval(layerObj + '["' + this.elementName + '"]' + styleObj + '.left = left'); } function animateObject(){ if (this.route.length > 4 && this.frameIndex < this.route.length) { this.move(this.route[this.frameIndex], this.route[this.frameIndex + 1]); this.frameIndex += 2; setTimeout('animatedObjects["' + this.elementName + '"].animate()', this.speed); } else if (this.route.length == 4 && this.frameIndex <= this.steps) { this.move(parseInt(this.route[0]) + (this.frameIndex * ((parseInt(this.route[2]) - parseInt(this.route[0])) / this.steps)), parseInt(this.route[1]) + (this.frameIndex * ((parseInt(this.route[3]) - parseInt(this.route[1])) / this.steps))); this.frameIndex++; setTimeout('animatedObjects["' + this.elementName + '"].animate()', this.speed); } else { eval(this.endRoutines + ""); this.frameIndex = 0; if (this.loop == "yes"){ this.animate(); } } } function initAnimation() { layerObj = (isNS) ? 'document' : 'document.all'; styleObj = (isNS) ? '' : '.style'; animationTime = new Array(); animationTimeline = new Array(); animatedObjects = new Object(); arro = new animatedObject('arroW', 'no', 25, 25, 'null', '148,150, 148,149, 149,149, 150,148, 151,147, 152,146, 154,144, 156,142, 158,141, 160,139, 162,137, 164,136, 166,134, 167,133, 168,132, 170,130, 172,129, 173,128, 175,127, 176,126, 178,124, 179,123, 181,122, 183,120, 184,119, 186,118, 188,116, 190,114, 192,113, 194,112, 195,111, 198,110, 200,108, 202,108, 203,106, 205,106, 207,105, 208,104, 209,104, 211,104, 213,103, 215,102, 216,102, 218,102, 220,101, 222,101, 224,100, 227,100, 228,100, 229,100, 231,100, 234,100, 236,100, 239,99, 241,99, 243,99, 245,99, 247,99, 249,99, 252,99, 255,99, 256,99, 258,99, 259,99, 263,99, 265,99, 267,99, 270,99, 272,99, 274,100, 275,100, 278,100, 281,101, 283,101, 286,102, 289,102, 292,103, 294,104, 296,104, 299,104, 302,106, 305,106, 308,107, 311,108, 315,109, 318,110, 319,111, 321,112, 323,112, 325,113, 327,114, 330,115, 332,116, 334,117, 336,118, 339,120, 341,121, 343,122, 344,124, 347,125, 349,126, 351,128, 353,129, 354,130, 355,131, 357,132, 359,134, 361,135, 363,136, 365,138, 367,139, 369,141, 371,142, 373,144, 375,145, 377,147, 379,148, 381,150, 383,152, 385,154, 388,156, 390,157, 391,158, 394,160, 396,162, 398,164, 400,166, 402,168, 404,169, 406,171, 407,172, 409,173, 411,175, 412,177, 414,179, 416,180, 418,182, 419,184, 421,185, 423,187, 423,188, 424,189, 425,190, 427,192, 428,193, 429,195, 431,197, 431,198, 432,199, 434,201, 435,204, 437,206, 438,208, 439,209, 439,211, 440,212, 441,213, 441,215, 442,216, 443,218, 443,221, 443,223, 444,225, 444,226, 444,227, 444,229, 444,230, 444,232, 444,235, 444,237, 444,239, 444,241, 443,242, 443,244, 443,246, 442,248, 442,249, 441,251, 441,252, 440,254, 440,256, 439,258, 439,260, 438,261, 437,262, 437,264, 436,266, 435,267, 435,268, 434,269, 433,270, 432,272, 431,273, 430,274, 429,276, 427,276, 426,278, 425,279, 423,280, 421,282, 420,283, 419,284, 417,285, 415,286, 412,287, 409,289, 407,290, 404,291, 402,292, 400,292, 399,293, 396,294, 394,295, 391,296, 388,296, 386,297, 385,297, 383,298, 382,298, 379,298, 377,298, 375,298, 373,298, 371,298, 369,298, 367,298, 365,298, 363,298, 360,298, 357,298, 354,297, 352,297, 349,297, 346,296, 343,296, 341,295, 338,294, 332,293, 328,292, 326,292, 324,291, 323,290, 319,289, 316,288, 314,286, 311,285, 308,283, 306,282, 304,281, 303,280, 302,278, 300,277, 297,273, 295,272, 294,270, 293,269, 289,265, 288,264, 287,262, 286,260, 284,257, 283,256, 282,253, 281,252, 280,248, 280,246, 279,244, 278,241, 278,238, 277,236, 277,234, 277,231, 276,230, 276,228, 276,226, 276,224, 276,222, 276,218, 276,216, 276,214, 276,210, 277,208, 277,206, 277,204, 278,202, 278,200, 279,197, 280,195, 282,192, 283,191, 284,189, 287,186, 288,185, 291,182, 292,181, 293,181, 295,180, 296,180, 301,180, 303,180, 304,180, 305,180, 307,180, 312,180, 315,181, 321,183, 323,184, 324,185, 326,186, 327,187, 329,188, 330,189, 333,192, 334,194, 335,194, 335,195, 337,198, 339,202, 340,202, 340,203, 340,205, 340,208, 340,209, 340,210, 339,212, 339,213'); aha = new animatedObject('ahaU', 'no', 25, 25, 'null', '-126,130,212,130'); whoosA = new animatedObject('whoos3', 'no', 25, 25, 'null', '600,136,-175,136'); whoos = new animatedObject('whoosR', 'no', 25, 25, 'null', '600,204,-175,204'); whoos2 = new animatedObject('whoosL', 'no', 25, 25, 'null', '-175,204,675,204'); mous = new animatedObject('mousO', 'no', 25, 25, 'null', '600,196,176,196'); welcome = new animatedObject('welcom', 'no', 25, 25, 'null', '200,205,200,60'); demo = new animatedObject('demoT', 'no', 25, 25, 'null', '230,-42,230,290'); woosha = new animatedObject('wooshA', 'no', 25, 25, 'null', '230,230,230,230'); animationTimeline[0] = new Array(); animationTimeline[0][01] = 'arro.show(); arro.animate();'; animationTimeline[0][10] = 'aha.show(); aha.animate();'; animationTimeline[0][25] = 'whoosA.show(); whoosA.animate();'; animationTimeline[0][35] = 'mous.show(); mous.animate();'; animationTimeline[0][105] = 'demo.show(); demo.animate();'; animationTimeline[0][140] = 'whoos.show(); whoos.animate();'; animationTimeline[0][141] = 'whoos2.show(); whoos2.animate();'; startTimeline(0); } var layerObj, styleObj, totalTime, currTime; var animationTime, animationTimeline, animatedObjects; var bon, boff; var isNS = (navigator.appName == "Netscape"); var isDHTML = (parseInt(navigator.appVersion) > 3); // --> </SCRIPT> </HEAD> <BODY BGCOLOR="#000000" TEXT="#9966CC" LINK="#FF0000" VLINK="#6699FF" ALINK="#FF0000" background="images/blustrp4.gif" onLoad = "initAnimation()"> <DIV ID = "welcom" CLASS = "wel"><B>W &nbsp; E &nbsp; L &nbsp; C &nbsp; O &nbsp; M &nbsp; E</B> </DIV> <DIV ID = "whoosR" STYLE = "position: absolute; left: 10; top: 125; visibility: hidden;"> </DIV> <DIV ID = "whoosL" STYLE = "position: absolute; left: 10; top: 125; visibility: hidden;"> </DIV> <DIV ID = "demoT" STYLE = "position: absolute; left: 10; top: 125; visibility: hidden;"> <IMG SRC = "images/demtutr.gif" NAME = "demo" HEIGHT = "41" WIDTH = "175" border=0> </DIV> <DIV ID = "whoos3" STYLE = "position: absolute; left: 10; top: 125; visibility: hidden;"> </DIV> <DIV ID = "ahaU" STYLE = "position: absolute; left: 10; top: 125; visibility: hidden;"> <IMG SRC = "images/ahav4.gif" NAME = "aha" HEIGHT = "31" WIDTH = "198" border=0> </DIV> <DIV ID = "mousO" STYLE = "position: absolute; left: 10; top: 125; visibility: hidden;"> <IMG SRC = "images/mslay4.gif" NAME = "mous" HEIGHT = "33" WIDTH = "288" border=0> </DIV> <DIV ID = "arroW" STYLE = "position: absolute; left: 10; top: 125; visibility: hidden;"> <IMG SRC = "images/arrow.gif" NAME = "arro" HEIGHT = "42" WIDTH = "29"> </DIV> </BODY> </HTML>
[ Navrat / BACK ]