MSPA Forums
Page 2 of 2 FirstFirst 12
Results 26 to 43 of 43

Thread: Roxy: Sleepwalk

  1. #26
    Mage of Void
    Join Date
    Mar 2011
    Posts
    79

    Re: Roxy: Sleepwalk

    Sorry to threadjack a little, but I threw together a Greasemonkey script for those of you who use that instead of Stylish. It's fairly customisable, so if you want a different size/person sleepwalking that's easy enough to change by changing the image source, and you can change the speed at which they float across the screen and the amount they bob up and down by playing around with the variables.



    Code:
    // ==UserScript==
    // @name           Sleepwalker
    // @namespace      agnomen
    // @description    Sleepwalks an image across the top of the browser window.
    // @include *mspaintadventures*
    // ==/UserScript==
    
    
    function sleepWalk(sleepwalker, steps){
    var speed = 1
    var height_from_top = 20
    var bob_frequency = 0.3
    var bob_height = 7
    
    steps += 1
    sleepwalker.style.left = speed*steps
    sleepwalker.style.top = height_from_top - Math.floor(bob_height*Math.sin(bob_frequency*steps))
    t = setTimeout(function(){sleepWalk(sleepwalker,steps)}, 100)
    }
    
    var newPic = document.createElement('img')
    newPic.src = "http://i.imgur.com/yM3QX.gif"
    document.body.appendChild(newPic)
    newPic.style.position = "fixed"
    newPic.style.top = 0
    newPic.style.left = 0
    sleepWalk(newPic, 0)

    It works on Firefox 11 with whichever version of Greasemonkey I'm running. No promises if it'll run anywhere else since it's been cobbled together through various dark arts.
    Last edited by agnomen; 03-25-2012 at 05:12 PM.

  2. #27
    Electricwestern's Avatar
    Join Date
    Jul 2011
    Location
    Land of Wind and Beards (Michigan)
    Posts
    171

    Re: Roxy: Sleepwalk

    Got the Java program, it worked like a charm. Excellent.
    http://electricwestern.deviantart.com/
    Look at all the arts I have. I make props and other interesting things.

  3. #28
    Large Ham unbridledExüberance's Avatar
    Join Date
    Feb 2011
    Location
    Land of Ones and Zeroes
    Pronouns
    he/him/his
    Posts
    1,606

    Re: Roxy: Sleepwalk

    Quote Originally Posted by Electricwestern View Post
    Got the Java program, it worked like a charm. Excellent.
    I just updated it so that now Roxy can appear at any side of the screen instead of just the right side, the images are embedded in the JAR so you can now run the jar from anywhere, and roxy behaves properly at the top and left edges of the screen. FOR SCIENCE.

  4. #29
    Reaper of all things Kawaii
    Join Date
    Mar 2012
    Location
    Yamaku
    Posts
    5

    Re: Roxy: Sleepwalk

    This. This is why nice things sleep soundly.
    ¿ʇı ʇ,usı uʍop ǝpısdn sı ʇxǝʇ ʎɯ 'ʇıɥs

  5. #30
    63 of Me Destruction Dragon 360's Avatar
    Join Date
    Dec 2011
    Location
    BITCH I'M IN SPACE CUBA!!
    Posts
    4,380

    Re: Roxy: Sleepwalk

    I seem to be having trouble getting it to work, well, at all! I use Google Chrome and I make sure to install to the right browser, but after that, nothing! I've tried 'managing' and 'editing' the style but I can't figure any of this out! What is it that I'm missing?
    DANI IS THE COOLEST AND SO IS CANDY CORN

  6. #31
    Depressed as SHIT Hpboy7's Avatar
    Join Date
    Sep 2011
    Location
    Lake Wobegon, Minnesota
    Posts
    1,885

    Re: Roxy: Sleepwalk

    table[width="600"] {
    overflow-x: hidden;
    }

    table[width="600"] tr:first-child+tr+tr {
    position: relative;
    display: block;
    background-color: transparent;
    }

    table[width="600"] tr:first-child+tr+tr td {
    padding-left: 820px;
    position: absolute;
    display: block;
    left: -163px;
    background-color: transparent;
    width: 100%;
    }

    table[width="600"] tr:first-child+tr+tr td:before {
    content: url(http://img851.imageshack.us/img851/9...eepwalxy.gif);
    position: absolute;
    height: 242px;
    top: -400px;
    left: 820px;
    }

    table[width="600"] tr:first-child+tr:hover+tr td:before {
    left: 0;
    -moz-transition-property: left;
    -moz-transition-duration: 4s;
    -moz-transition-timing-function: linear;
    }

    table[width="600"] tr:first-child+tr:hover+tr td {
    padding-left: 0;
    -webkit-transition-property: padding-left;
    -webkit-transition-duration: 4s;
    -webkit-transition-timing-function: linear;
    }
    My fantroll ask blog! Ask them anything!
    OOC Handle: palindromeTacocat Main Troll Handle:fangDiplomacy
    Fantroll profiles can be found here.

  7. #32
    Violet CLM's Avatar
    Join Date
    Jan 2011
    Location
    Santa Cruz, CA
    Pronouns
    [none]
    Posts
    1,642

    Re: Roxy: Sleepwalk

    Quote Originally Posted by Hpboy7 View Post
    left: 820px;
    That's the Firefox version. Replace this with left: auto !important; and you should be good to go.

    DD360, I would guess you're having the same problem?

  8. #33
    Depressed as SHIT Hpboy7's Avatar
    Join Date
    Sep 2011
    Location
    Lake Wobegon, Minnesota
    Posts
    1,885

    Re: Roxy: Sleepwalk

    yayyyyy it works now! thanks a bunch!
    My fantroll ask blog! Ask them anything!
    OOC Handle: palindromeTacocat Main Troll Handle:fangDiplomacy
    Fantroll profiles can be found here.

  9. #34
    Fandom Ambassador Freack's Avatar
    Join Date
    Jan 2012
    Location
    A Daze
    Posts
    5,379

    Re: Roxy: Sleepwalk

    Quote Originally Posted by Destruction Dragon 360 View Post
    I seem to be having trouble getting it to work, well, at all! I use Google Chrome and I make sure to install to the right browser, but after that, nothing! I've tried 'managing' and 'editing' the style but I can't figure any of this out! What is it that I'm missing?
    I am having the same issue. Is there a certain amount of time that counts as "hover" or something?
    [/CENTER]

  10. #35
    Prince of Half-Heart kholhaus's Avatar
    Join Date
    Jan 2011
    Location
    Land of Torrential Downpours and Art
    Posts
    4,177

    Re: Roxy: Sleepwalk

    Quote Originally Posted by unbridledExüberance View Post
    I made a thing in Java (yes, I know using Java for this- or pretty much anything actually- a massive waste of resources, but I just wanted to throw something together really quick) that makes Roxy sleepwalk across your screen every 2 - 10 minutes. To close the program, double right-click Roxy.

    Screenshot:[link]
    Download: [link] (REQUIRES JAVA 7. If you don't have Java 7, you'll just get a black box moving around the screen.)

    It won't work properly if you don't have compositing enabled. If you're using basically any non-ancient version of Mac or Linux, you're fine unless you're using a window manager with compositing off. Window Vista and later should have the necessary support as well. Probably.

    How smoothly Roxy moves accross the screen is entirely up to your window manager.

    EDIT: Updated program. The roxy sprite is now embedded in the JAR, so you can run the jar file from anywhere and it will work. Roxy also now comes from any side of the screen and behaves properly at the top and left sides of the screen, though there is a bit of flicker when she is partially offscreen on the left or top edge of the screen since Java doesn't allow vsync with Graphics2D for some stupid reason.
    I can't right-click on her to get her to stop!

    HEEEEEEEEEEELP

    There's a black box around her, and I'm using java 7 RE.

  11. #36
    Violet CLM's Avatar
    Join Date
    Jan 2011
    Location
    Santa Cruz, CA
    Pronouns
    [none]
    Posts
    1,642

    Re: Roxy: Sleepwalk

    Quote Originally Posted by Freack View Post
    I am having the same issue. Is there a certain amount of time that counts as "hover" or something?
    Quote Originally Posted by Violet CLM View Post
    Replace left: 820px; with left: auto !important; and you should be good to go.
    lalala


    (I'm still using this. It works better for some panels than others -- if the panel is more zoomed in than the Roxy sprite, things look weird -- but overall it's pretty silly to see her flying around everywhere.)
    Last edited by Violet CLM; 05-13-2012 at 08:09 PM.

  12. #37
    Large Ham unbridledExüberance's Avatar
    Join Date
    Feb 2011
    Location
    Land of Ones and Zeroes
    Pronouns
    he/him/his
    Posts
    1,606

    Re: Roxy: Sleepwalk

    Quote Originally Posted by kholhaus View Post
    I can't right-click on her to get her to stop!

    HEEEEEEEEEEELP

    There's a black box around her, and I'm using java 7 RE.
    Are you using Windows XP or eariler? If so, it's window manager doesn't support transparency among other things (kind of ironic considering the OS is named Windows isn't it?). Actually, it might not work on Vista either. I haven't actually tested it on Windows.

    Also, you need to double right-click to make it stop, not just right click.

  13. #38
    I'm the Jack of Butts. It's me Albel-is-MINE's Avatar
    Join Date
    Dec 2011
    Location
    The Land of Butts and Apples
    Posts
    92

    Re: Roxy: Sleepwalk

    Quote Originally Posted by unbridledExüberance View Post
    Are you using Windows XP or eariler? If so, it's window manager doesn't support transparency among other things (kind of ironic considering the OS is named Windows isn't it?). Actually, it might not work on Vista either. I haven't actually tested it on Windows.

    Also, you need to double right-click to make it stop, not just right click.
    I'm using Windows 7 and I have this problem as well.

  14. #39
    Large Ham unbridledExüberance's Avatar
    Join Date
    Feb 2011
    Location
    Land of Ones and Zeroes
    Pronouns
    he/him/his
    Posts
    1,606

    Re: Roxy: Sleepwalk

    Do you have Java 7? It won't work with Java 6 since they only recently added support for transparent windows.

  15. #40
    Physcopathic cautiousValidity's Avatar
    Join Date
    Jun 2012
    Location
    Land of Glass and Masks
    Posts
    275

    Re: Roxy: Sleepwalk

    Yes. This is amazing. She is sleepwalking across my screen right now



  16. #41

    Re: Roxy: Sleepwalk

    Also on Windows 7 with newest Java here, also having problem with black boxes and rightclicking not working.

  17. #42
    Large Ham unbridledExüberance's Avatar
    Join Date
    Feb 2011
    Location
    Land of Ones and Zeroes
    Pronouns
    he/him/his
    Posts
    1,606

    Re: Roxy: Sleepwalk

    Huh. Once I'm done with my current programming project, I'll whip up a sleepwalking Roxy in C++ that will hopefully work on Windows since apparently the Java one only works on Linux and Mac?

  18. #43

    Re: Roxy: Sleepwalk

    Thanks, but I also need to know how to make this one stop.

    EDIT: Ignore me, I'm an idiot, restarting did it.
    Last edited by digiexpert; 06-24-2012 at 10:18 AM.

Page 2 of 2 FirstFirst 12

Posting Permissions

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