Pages: 12

  2008-06-22 05:48:57

chan2raagas
» FTalker
FTalk Level: zero
171
0
1969-12-31

[align=center][b][u]CLICK FOR THE PREVIEW[/b][/u][quote][url=http://profiles.friendster.com/32477026][img]http://www.myklmphotoframes.com/images/preview_sign.jpg[/img][/url] :arrow: [url=http://profil

[align=center][b][u]CLICK FOR THE PREVIEW[/b][/u][quote][url=http://profiles.friendster.com/32477026][img]http://www.myklmphotoframes.com/images/preview_sign.jpg[/img][/url] :arrow: [url=http://profiles.friendster.com/32477026]PREVIEW[/url] :thumbsup:[/quote] [/align] [b]PLEASE RATE[/b] =) [u][b]STEP 1[/b][/u] Save this code to a js extension. name it "[b]websaver.js[/b]" [b]Starfield Animation[/b] [spoiler]//<script type="text/javascript"> function Graphics(canvas) { this.canvas = canvas; this.cache = new Array; this.shapes = new Object; this.nObject = 0; // defaults this.penColor = "black"; this.zIndex = 0; } Graphics.prototype.createPlotElement = function(x,y,w,h) { // detect canvas if ( !this.oCanvas ) { switch ( typeof(this.canvas) ) { case "string": this.oCanvas = document.getElementById(this.canvas); break; case "object": this.oCanvas = this.canvas; break; default: this.oCanvas = document.body; break; } } // retrieve DIV var oDiv; if ( this.cache.length ) oDiv = this.cache.pop(); else { oDiv = document.createElement('div'); this.oCanvas.appendChild(oDiv); oDiv.style.position = "absolute"; oDiv.style.margin = "0px"; oDiv.style.padding = "0px"; oDiv.style.overflow = "hidden"; oDiv.style.border = "0px"; } // set attributes oDiv.style.zIndex = this.zIndex; oDiv.style.backgroundColor = this.penColor; oDiv.style.left = x; oDiv.style.top = y; oDiv.style.width = w + "px"; oDiv.style.height = h + "px"; oDiv.style.visibility = "visible"; return oDiv; } Graphics.prototype.releasePlotElement = function(oDiv) { oDiv.style.visibility = "hidden"; this.cache.push(oDiv); } Graphics.prototype.addShape = function(shape) { shape.oGraphics = this; shape.graphicsID = this.nObject; this.shapes[this.nObject] = shape; this.nObject++; shape.draw(); return shape; } Graphics.prototype.removeShape = function(shape) { if ( (shape instanceof Object) && (shape.oGraphics == this) && (this.shapes[shape.graphicsID] == shape) ) { shape.undraw(); this.shapes[shape.graphicsID] = undefined; shape.oGraphics = undefined; } } Graphics.prototype.clear = function() { for ( var i in this.shapes ) this.removeShape(this.shapes[i]); } //============================================================================= // Point Graphics.prototype.drawPoint = function(x,y) { return this.addShape(new Point(x,y)) } function Point(x,y) { this.x = x; this.y = y; } Point.prototype.draw = function() { this.oDiv = this.oGraphics.createPlotElement(this.x,this.y,1,1); } Point.prototype.undraw = function() { this.oGraphics.releasePlotElement(this.oDiv); this.oDiv = undefined; } //============================================================================= // Line Graphics.prototype.drawLine = function(x1,y1,x2,y2) { return this.addShape(new Line(x1,y1,x2,y2)) } function Line(x1,y1,x2,y2) { this.x1 = x1; this.y1 = y1; this.x2 = x2; this.y2 = y2; } Line.prototype.draw = function() { this.plots = new Array; var dx = this.x2 - this.x1; var dy = this.y2 - this.y1; var x = this.x1; var y = this.y1; var n = Math.max(Math.abs(dx),Math.abs(dy)); dx = dx / n; dy = dy / n; for ( i = 0; i <= n; i++ ) { this.plots.push(this.oGraphics.createPlotElement(Math.round(x),Math.round(y),1,1)); x += dx; y += dy; } } Line.prototype.undraw = function() { while ( this.plots.length ) this.oGraphics.releasePlotElement(this.plots.pop()); this.plots = undefined; } //============================================================================= // Circle Graphics.prototype.drawCircle = function(x,y,r) { return this.addShape(new Circle(x,y,r)) } function Circle(x,y,r) { this.x = x; this.y = y; this.radius = r; } Circle.prototype.draw = function() { this.plots = new Array; var r2 = this.radius * this.radius; var x = 0; var y = this.radius; while ( x <= y ) { this.plots.push(this.oGraphics.createPlotElement(Math.round(this.x + x), Math.round(this.y + y), 1, 1)); this.plots.push(this.oGraphics.createPlotElement(Math.round(this.x - x), Math.round(this.y + y), 1, 1)); this.plots.push(this.oGraphics.createPlotElement(Math.round(this.x + x), Math.round(this.y - y), 1, 1)); this.plots.push(this.oGraphics.createPlotElement(Math.round(this.x - x), Math.round(this.y - y), 1, 1)); this.plots.push(this.oGraphics.createPlotElement(Math.round(this.x + y), Math.round(this.y + x), 1, 1)); this.plots.push(this.oGraphics.createPlotElement(Math.round(this.x + y), Math.round(this.y - x), 1, 1)); this.plots.push(this.oGraphics.createPlotElement(Math.round(this.x - y), Math.round(this.y + x), 1, 1)); this.plots.push(this.oGraphics.createPlotElement(Math.round(this.x - y), Math.round(this.y - x), 1, 1)); x++; y = Math.round(Math.sqrt(r2 - x*x)); } } Circle.prototype.undraw = Line.prototype.undraw; //============================================================================= // FillRectangle Graphics.prototype.fillRectangle = function(x,y,w,h) { return this.addShape(new FillRectangle(x,y,w,h)) } function FillRectangle(x,y,w,h) { this.x = x; this.y = y; this.w = w; this.h = h; } FillRectangle.prototype.draw = function() { this.oDiv = this.oGraphics.createPlotElement(this.x,this.y,this.w,this.h); } FillRectangle.prototype.undraw = Point.prototype.undraw; //============================================================================= function drawProp() { if ( p ) gr.removeShape(p); var x = Math.round(Math.sin(a) * 45); var y = Math.round(Math.cos(a) * 45); a -= Math.PI / 25; gr.penColor = "black"; p = gr.drawLine(100 + x, 100 + y, 100 - x, 100 - y); window.setTimeout("drawProp();", 10); } function drawShapes() { gr.penColor = "red"; gr.drawLine(10,10,190,190); gr.penColor = "green"; gr.drawLine(190,10,10,190); gr.penColor = "blue"; c = gr.drawCircle(100,100,45); gr.zIndex = 1; gr.penColor = "lime"; gr.fillRectangle(50,70,100,20); gr.zIndex = 0; drawProp(); } //</script>[/spoiler] ============================================================================ [u][b]STEP 2[/b][/u] Save this to a [b]HTML[/b] format [b]IMPORTANT NOTE[/b]: JUST RELPACE THE BOLD PART [spoiler]<html> <head> <title>[b]Title of ur Page[/b]</title> <body bgcolor="#000000"> <script src="[b]url of ur websaver.js[/b]"></script> <script type="text/javascript"> Point.prototype.move = function(x,y) { this.oDiv.style.left = x + "px"; this.oDiv.style.top = y + "px"; } Point.prototype.setSize = function(nSize) { this.oDiv.style.width = nSize + "px"; this.oDiv.style.height = nSize + "px"; } function StarFieldSaver(settings) { // default values this.speed = 50; this.nStars = 50; this.zIndex = 1000; // override with settings values if ( settings.speed ) this.speed = settings.speed; if ( settings.nStars ) this.nStars = settings.nStars; if ( settings.zIndex ) this.zIndex = settings.zIndex; } StarFieldSaver.prototype.init = function() { this.oCanvas = document.createElement("div"); document.body.appendChild(this.oCanvas); this.oCanvas.style.zIndex = this.zIndex; this.oCanvas.style.position = "absolute"; this.oCanvas.style.backgroundColor = "black"; this.g = new Graphics(this.oCanvas); this.g.penColor = "white"; this.aPoints = new Array(); } StarFieldSaver.prototype.start = function() { if ( this.bActive ) return; this.bActive = true; if ( !this.oCanvas ) this.init(); this.oCanvas.style.visibility = "visible"; this.tick(); } StarFieldSaver.prototype.stop = function() { if ( !this.bActive ) return; window.clearTimeout(this.timerID); this.oCanvas.style.visibility = "hidden"; for ( var i in this.aPoints ) { this.aPoints[i].undraw(); } this.aPoints = new Array(); this.bActive = false; } StarFieldSaver.prototype.tick = function() { this.oCanvas.style.left = document.body.scrollLeft + "px"; this.oCanvas.style.top = document.body.scrollTop + "px"; this.oCanvas.style.width = document.body.clientWidth + "px"; this.oCanvas.style.height = document.body.clientHeight + "px"; this.width = document.body.clientWidth; this.height = document.body.clientHeight; var cx = this.width / 2; var cy = this.height / 2; for ( var i in this.aPoints ) { var p = this.aPoints[i]; var dx = p.x - cx; var dy = p.y - cy; // move point outwards p.x += dx / 50; p.y += dy / 50; if ( (p.x < 0) || (p.x > this.width - Math.ceil(p.n/50)) || (p.y < 0) || (p.y > this.height - Math.ceil(p.n/50)) ) { p.x = Math.random() * this.width; p.y = Math.random() * this.height; p.n = 0; } p.move(Math.floor(p.x),Math.floor(p.y)); // resize as they get closer p.setSize(Math.ceil(p.n++ / 50)) } while ( this.aPoints.length < this.nStars ) { var x = Math.random() * this.width; var y = Math.random() * this.height; var p = this.g.drawPoint(Math.floor(x), Math.floor(y)); p.setSize(1); p.x = x; p.y = y; p.n = 0; this.aPoints.push(p); } var pThis = this; var f = function(){pThis.tick();} this.timerID = window.setTimeout(f,this.speed); } function ScreenSaver(settings) { this.settings = settings; this.nTimeout = this.settings.timeout; document.body.screenSaver = this; // link in to body events document.body.onmousemove = ScreenSaver.prototype.onevent; document.body.onmousedown = ScreenSaver.prototype.onevent; document.body.onkeydown = ScreenSaver.prototype.onevent; document.body.onkeypress = ScreenSaver.prototype.onevent; var pThis = this; var f = function(){pThis.timeout();} this.timerID = window.setTimeout(f, this.nTimeout); } ScreenSaver.prototype.timeout = function() { if ( !this.saver ) { this.saver = this.settings.create(); } this.saver.start(); } ScreenSaver.prototype.signal = function() { if ( this.saver ) { this.saver.stop(); } window.clearTimeout(this.timerID); var pThis = this; var f = function(){pThis.timeout();} this.timerID = window.setTimeout(f, this.nTimeout); } ScreenSaver.prototype.onevent = function(e) { this.screenSaver.signal(); } var saver; function initScreenSaver() { //blort; saver = new ScreenSaver({timeout:1000,speed:50,nStars:100,zIndex:100,create:function(){return new StarFieldSaver(this);}}); } </script> </head> <body onload="initScreenSaver();"> <div id=debug></div> <META NAME="Generator" CONTENT="Microsoft FrontPage 4.0"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <SCRIPT LANGUAGE="JavaScript"> <!-- --> <!-- The JavaScript Source!! http://javascript.internet.com --> <!-- Begin function popUp(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=0,width=579,height=583,left = 12,top = -116');"); } // End --> </script> <style type="text/css"> body { overflow-x: hidden; } #image{border-width:0px;} </style> <script> //Hide status bar msg II script- by javascriptkit.com //Visit JavaScript Kit (http://javascriptkit.com) for script //Credit must stay intact for use function hidestatus(){ window.status='' return true } if (document.layers) document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT) document.onmouseover=hidestatus document.onmouseout=hidestatus </script> </head> <body bgcolor="black"> <Script Language="JavaScript"> function newindex() {for (var i=0; i< (newindex.arguments.length - 1); i+=2) eval(newindex.arguments[i]+".location='"+newindex.arguments[i+1]+"'"); document.returnValue = false;} //Hide status bar msg II script- by javascriptkit.com //Visit JavaScript Kit (http://javascriptkit.com) for script //Credit must stay intact for use function hidestatus(){ window.status='' return true } if (document.layers) document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT) document.onmouseover=hidestatus document.onmouseout=hidestatus </script> </head> <body bgcolor="[b]#000000[/b]"> <STYLE type="text/css"> BODY { background: black url("[b]YOUR IMAGE URL[/b]"); background-repeat: no-repeat; background-position: right bottom; background-attachment: fixed; } </STYLE> <Script Language="JavaScript"> function newindex() {for (var i=0; i< (newindex.arguments.length - 1); i+=2) eval(newindex.arguments[i]+".location='"+newindex.arguments[i+1]+"'"); document.returnValue = false;} </Script> <center><table id='table_image' width="000" height="000" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center" valign="middle" bgcolor="[b]#000000[/b]"> <a href="http://profiles.friendster.com/user.php?uid=[b]Ur User ID[/b]"><img id='image' src="[b]PIC U WANT TO USE[/b]" alt="Please leave comments befor leaving"></a> <br><a href="http://profiles.friendster.com/user.php?uid=[b]Ur User ID[/b]"><font color="#33ff00" size="6" face="arial">Enter</font></a><font color="[b]#ff0033[/b]"> | </font><a href="http://www.friendster.com/"><font color="[b]#ff99ff[/b]" size="6" face="arial">Leave</font></a> <br><center><font color="[b]#ff0033[/b]" size="3" face="arial"> </ </td> </tr> </table> </center> </body> </html>[/spoiler] =========================================================================== [b]STEP 3[/b] Use this [b]Final JS "[u]Tazmaine Enterpage Trick[/u]"[/b] [spoiler] var myplace = document.location.href; if (myplace == "http://profiles.friendster.com/user.php?uid=[b]YOUR USER ID[/b]"){ } else if (myplace == "http://profiles.friendster.com/user.php?uid=[b]YOUR USER ID[/b]"){ } else { location.href = "[b]THE URL OF UR Starfield.HTML[/b]"; } [/spoiler] ======================================================================= [b]STEP 4 (OPTIONAL)[/b] [spoiler]repu.. repu.. repu.. lol. just kiddin'[/spoiler] ENJOY Friendstertalkers!

Last edited by chan2raagas (2008-06-26 06:09:21)

Pages: 12

Board footer

© 2025 F Talk

Current time is 04:27

[ 12 queries - 0.022 second ]
Privacy Policy