News:

If you need instructions on how to get through the hotels, check out the enclosed instruction book.

Main Menu

ON THIS DAY, I LEARN AS 3.0

Farted by zl, September 13, 2008, 01:31:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zl

[flash]http://spamtheweb.com/ul/upload/130908/52129_puppy.swf height=400 width=550 wmode=transparent[/flash]
use the arrow keys to run, crouch, and bark


and people who know actual code, maybe you can tell me where I am crazy?
package {
    import flash.display.*;
    import flash.events.*;
    import flash.media.Sound;

    public class puppy extends MovieClip {
        var dogrun:MovieClip=new doggy;
        var barky:MovieClip=new bark;
        var vx:Number = 0;
        var tx:Number = 0;
        public function puppy() {
            stage.focus = this;
            stage.addEventListener(KeyboardEvent.KEY_UP, keeeyup);
            stage.addEventListener(KeyboardEvent.KEY_DOWN, keeey);
            stage.addEventListener(Event.ENTER_FRAME, onEnterFrame);
            addChild(dogrun);
            dogrun.x = 400;
            dogrun.y = 200;
            function onEnterFrame(event:Event) {
                if (vx < tx) {
                    vx += .5;
                }
                if (vx > tx) {
                    vx += -.5;
                }
               
                dogrun.x += vx;
            }
            function keeey(event:KeyboardEvent) {
                if ((event.keyCode == 37) && (dogrun.currentFrame != 1)) {
                    dogrun.gotoAndStop(1);
                    tx = -6;
                }
                if ((event.keyCode == 39) && (dogrun.currentFrame != 2)) {
                    dogrun.gotoAndStop(2);
                    tx = 6;
                }
                if ((event.keyCode == 40) && ((dogrun.currentFrame == 1) || (dogrun.currentFrame == 3))) {
                    dogrun.gotoAndStop(5);
                    tx = 0;
                }
                if ((event.keyCode == 40) && ((dogrun.currentFrame == 2) || (dogrun.currentFrame == 4))) {
                    dogrun.gotoAndStop(6);
                    tx = 0;
                }
                if (event.keyCode == 38) {
                    barky.gotoAndPlay(2);
                }
            }
            function keeeyup(event:KeyboardEvent) {
                if (dogrun.currentFrame == 1) {
                    dogrun.gotoAndStop(3);
                    tx = 0;
                }
                if (dogrun.currentFrame == 2) {
                    dogrun.gotoAndStop(4);
                    tx = 0;
                }
                if (dogrun.currentFrame == 5) {
                    dogrun.gotoAndStop(3);
                }
                if (dogrun.currentFrame == 6) {
                    dogrun.gotoAndStop(4);
                }
            }
        }
    }
}


RomanClock

lemayo lol :soups:

FLOUNDERMAN_CLOCK

this is more fun than it should be.

Also: HOLY SHIT WHEN DID YOU BECOME AN ADMIN

RomanClock

lemayo lol :soups:


k0ma


PSN Network - BGK0

Steam ID- k0m4t0se

these are zeros, not o\'s, folks

Flounderman Jr.

i just hit up about 50 times at once

SnakeClock

This is the best application of ActionScript 3 I've yet seen.

RobClock


HitchhikerClock

42
Quote from: Boston;1416736I JUST LOST IT NO ONE METIONS THE MAGIC FAGGIT AND I WILL CRUSH THAT GUY WHO STARTED IT ITO PASTE ON MY LUNCH!!!!! HE WILL GET HIS MUTTAH FUCKIN ASS WOOPED!!!!!!!!

RevolutionaryClock


Silly Putty Clock

That's great. I think you should expand on this and turn it into a game. "The Great Tree Escape" or something like that.
8=======D~~~~>_<~~~~C=======8