Hello and welcome to our community! Is this your first visit?
Register
Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Fanatic Enthusiast Niall's Avatar

    Join Date
    Aug 2007
    Posts
    3,298

    New needed help: Random MC generating + mouse ease

    K, other problem solved; new ones needed!

    I wanna have basically, random movieclip generating that fall from the top of the screen downwards until they dissappear. Random numbers of them, just falling at different times.

    Like Nev's angry faic rip: http://www.swfcabin.com/open/1205341592

    Awesome, eh? I wannit >:C

    Another thing: I made a custom cursor, all works well, but I want it to have easing when I move it, so it doesn't move then stop. It moves, then eases down to a stop (the cursor).

    NAO

    Please c:

  2. #2
    Fanatic Enthusiast James's Avatar


    Join Date
    Aug 2007
    Location
    42.
    Posts
    3,119

    Re: Movieclip arrowkey easing

    Here is an excellent tut on making a platform game, and it has an easing movement script in it:
    Click

    Hope I helped you.

  3. #3
    Fanatic Enthusiast Niall's Avatar

    Join Date
    Aug 2007
    Posts
    3,298

    Re: Movieclip arrowkey easing

    Quote Originally Posted by jimbobster
    Here is an excellent tut on making a platform game, and it has an easing movement script in it:
    Click

    Hope I helped you.
    That came out with a fuckload of errors unfortunately when I tried what it said by adding to what I had with the ball's AS.

    Here is the .fla so in case anyone can help, they do: http://uploaded.pivothost.org/NiallTL/Iruled3k4.zip

    Look at the ball's actionscript and please tell me how to fix it.

    By the by, it's ruright now because I only started it today.

  4. #4
    Enthusiast Fyrren's Avatar

    Join Date
    Oct 2007
    Location
    Norway
    Posts
    1,595

    Re: Movieclip arrowkey easing

    Code:
    onClipEvent (load) {
        power = 0.3;
        yspeed = 0;
        xspeed = 0;
        friction = 0.95;
    }
    onClipEvent (enterFrame) {
        if (Key.isDown(Key.LEFT)) {
            xspeed -= power;
       }
       if (Key.isDown(Key.RIGHT)) {
           xspeed += power;
       }
       if (Key.isDown(Key.UP)) {
           yspeed -= power;
       }
       if (Key.isDown(Key.DOWN)) {
           yspeed += power;
       }
       xspeed *= friction;
       yspeed *= friction;
       _y += yspeed;
       _x += xspeed;
    }
    Try to insert that code in your movieclip. now it will move up and down though, but if you change the actions a little, it may help...
    ill see if i can do some more
    Sway bought me VIP a few years back. Respect.

  5. #5
    Fanatic Enthusiast Niall's Avatar

    Join Date
    Aug 2007
    Posts
    3,298

    Re: Movieclip arrowkey easing

    Quote Originally Posted by fyrren
    Code:
    onClipEvent (load) {
        power = 0.3;
        yspeed = 0;
        xspeed = 0;
        friction = 0.95;
    }
    onClipEvent (enterFrame) {
        if (Key.isDown(Key.LEFT)) {
            xspeed -= power;
       }
       if (Key.isDown(Key.RIGHT)) {
           xspeed += power;
       }
       if (Key.isDown(Key.UP)) {
           yspeed -= power;
       }
       if (Key.isDown(Key.DOWN)) {
           yspeed += power;
       }
       xspeed *= friction;
       yspeed *= friction;
       _y += yspeed;
       _x += xspeed;
    }
    Try to insert that code in your movieclip. now it will move up and down though, but if you change the actions a little, it may help...
    ill see if i can do some more
    That seems like it may work, I'll give it a shot when I get on the right computer. Thanks.

    EDIT: OH YES BABY! IT WORKED!I just changed this:
    Code:
    onClipEvent (load) {
        power = 0.3;
        yspeed = 0;
        xspeed = 0;
        friction = 0.95;
    }
    To:
    Code:
    onClipEvent (load) {
        power = 1.0;
        yspeed = 0;
        xspeed = 0;
        friction = 0.95;
    }
    I changed power to 1.0 instead of 0.3 and it worked, thanks so much <3

  6. #6
    Enthusiast Fyrren's Avatar

    Join Date
    Oct 2007
    Location
    Norway
    Posts
    1,595

    Re: Movieclip arrowkey easing

    Glad i Was helping
    Sway bought me VIP a few years back. Respect.

  7. #7
    Fanatic Enthusiast Niall's Avatar

    Join Date
    Aug 2007
    Posts
    3,298

    Re: New needed help: Random MC generating + mouse ease

    New help needed please C;

  8. #8
    Enthusiast Fyrren's Avatar

    Join Date
    Oct 2007
    Location
    Norway
    Posts
    1,595

    Re: New needed help: Random MC generating + mouse ease

    I Cannot Let Him Bounce But...:

    Code:
     onClipEvent (load) {
         power = 0.3;
         yspeed = 0;
         xspeed = 0;
         friction = 0.95;
         gravity = 0.1
     }
    
     onClipEvent (enterFrame) {
        if (Key.isDown(Key.LEFT)) {
            xspeed -= power;
        }
        if (Key.isDown(Key.RIGHT)) {
            xspeed += power;
        }
        if (Key.isDown(Key.UP)) {
            yspeed -= power;
        }
        if (Key.isDown(Key.DOWN)) {
            yspeed += power;
        }
        xspeed *= friction;
        yspeed += gravity;
        _y += yspeed;
        _x += xspeed;
    }
    Hope That Also Helped!
    Sway bought me VIP a few years back. Respect.

  9. #9
    Fanatic Enthusiast Niall's Avatar

    Join Date
    Aug 2007
    Posts
    3,298

    Re: New needed help: Random MC generating + mouse ease

    How will that help?

    Isn't that the same code used in the other help you gave me? How can that generate random MC's or add easing to the mouse?

  10. #10
    Enthusiast Fyrren's Avatar

    Join Date
    Oct 2007
    Location
    Norway
    Posts
    1,595

    Re: New needed help: Random MC generating + mouse ease

    If You Add That Code The Guy Will Start Falling Down... Thats What Happened to me though...

    Now its added "gravity"
    Sway bought me VIP a few years back. Respect.


 
Page 1 of 2 12 LastLast

Posting Permissions

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