Results 1 to 5 of 5

Thread: Java funny script

  1. #1
    Member Array
    Join Date
    Jul 2009
    Location
    Bhubaneswar, India, India
    Posts
    1,457
    Rep Power
    0

    Java funny script

    This is funny, when you place the code below into your browse url bar and press enter all the images from any website your on with being to fly around the place. Its quite funny


    code


     



    javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI= document.images; DIL=DI.length; function A(){for(i=0; i<DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterv al('A()',5 ); void(0)



  2. #2
    Member Array
    Join Date
    Jul 2009
    Location
    Bhubaneswar, India, India
    Posts
    1,457
    Rep Power
    0
    javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; var DI= document.images; DIL=DI.length; function A(){for(i=0; i<DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5+"px"; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5+"px"}R++}tag= setInterval('A()',5 );document.onmousedown=function(){clearInterval(ta g);for(i=0; i<DIL; i++){DI[i].style.position="static";}}; void(0)

  3. #3
    Member Array
    Join Date
    Jul 2009
    Location
    Bhubaneswar, India, India
    Posts
    1,457
    Rep Power
    0
    Modified it to only move when your mouse is moving, as well as revolve around the mouse.

    This one only seems to work in firefox, however, and can't exactly be stopped.

    Working on tweaking it a little to make the images follow the mouse in a trail.

    I'm pretty sure the reason IE doesn't like my script is because of the way I find the mouse coords. Any ideas?

    Code:

    javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=100; y4=100; var DI= document.images; DIL=DI.length; function A(_X,_Y){for(i=0; i<DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+_X+"px"; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+_Y+"px"}R++}docu ment.onmousemove=function(event){_X = event.clientX; _Y = event.clientY; A(_X,_Y);};document.onmousedown=function(){for(i=0 ; i<DIL; i++){DI[i].style.position="static";}};void(0)


    --edit--
    Can't seem to get a follower script working. Will try more later (this is fun).

  4. #4
    Member Array
    Join Date
    Jul 2009
    Location
    Bhubaneswar, India, India
    Posts
    1,457
    Rep Power
    0
    Ok, so, Iand my friend have been working on making a scrpt to make all images follow the mouse in a trail. I think I am close, but I just can't quite get it to work correctly.

    Heres the code I have so far, any input is appreciated.

    Code:

    javascript:
    var acc=1;
    var DI=document.images;
    var DIL=DI.length;
    function A(){
    for(i=1; i<DIL; i++){
    DI[i].style.position='absolute';
    if(DI[i].style.left!=DI[i-1].style.left){
    DI[i].style.left = DI[i].style.left+((DI[i-1].style.left-DI[i].style.left)/acc)+'px';
    }
    if(DI[i].style.top!=DI[i-1].style.top){
    DI[i].style.top = DI[i].style.top+((DI[i-1].style.top-DI[i].style.top)/acc)+'px';
    }
    }
    }
    function moveFirst(event){
    var IE = document.all?true:false;
    if(!IE){
    var _X=event.clientX;
    var _Y=event.clientY;
    }
    else if(IE){
    var _X=window.event.clientX;
    var _Y=window.event.clientY;
    }
    var DIS=DI[0].style;
    DIS.position='absolute';
    DIS.left=_X; DIS.top=_Y;
    }
    function Clear(){
    clearInterval(tag);
    for(i=0; i<DIL; i++){
    DI[i].style.position="static";
    }
    }
    document.onmousemove=moveFirst;
    A();
    var tag=setInterval('A()',5,'JavaScript');
    document.onmousedown=Clear();
    void(0);


    Obviously you would need to remove the indentation and form to copy it to the URL bar, but I have it this way so that it's easier to read and debug.

  5. #5
    Member Array
    Join Date
    Jul 2009
    Location
    Bhubaneswar, India, India
    Posts
    1,457
    Rep Power
    0
    Copy/Paste the Following javascript into your address bar ..
    And see the Funny Effect ..!!

    * Moving Browser Window


    javascript:function Shw(n) {if (self.moveBy) {for (i = 35; i > 0; i--) {for (j = n; j > 0; j--) {self.moveBy(1,i);self.moveBy(i,0);self.moveBy(0,-i);self.moveBy(-i,0); } } }} Shw(6)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)







Similar Threads

  1. Best forum script.
    By admin in forum Internet
    Replies: 0
    Last Post: 01-06-2011, 03:26 PM
  2. [[M]]Not magic ..just a brilliant Java Script @ work
    By cybermaX3 in forum Knowledge Sharing
    Replies: 10
    Last Post: 08-07-2009, 05:08 PM
  3. java
    By sabercool in forum Jokes
    Replies: 0
    Last Post: 08-20-2008, 10:31 PM
  4. ShaKinG sCrIpT
    By shalin_99 in forum Computers and Laptops
    Replies: 7
    Last Post: 10-22-2007, 06:23 PM
  5. Java Interview
    By sweety4u in forum Jokes
    Replies: 6
    Last Post: 09-13-2007, 11:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Get Daily Forum Updates

Get Most Amazing E-mails Daily
Full of amazing emails daily in your inbox
Join Nidokidos E-mail Magazine
Join Nidokidos Official Page on Facebook


Like us on Facebook | Get Website Updates | Get our E-Magazine