POLALA.COM
welcome to my space
X
Welcome to:polala.com
Search:  
Web Design | Video Games | RVs | Religion | Management | Supplements and Vitamins | Software | Basketball | Related articles
NAVIGATION: Home >>
The AS Battle Game.
Published by: jack 2010-03-14

  • Tank-o-Box :: Battle Tank Game::
    Tank-o-Box is a new action-packed remake of a classic arcade battle tank game. Modern 3D graphics, 3D sound (*) and fancy game engine guarantee the ultimate
    http://www.tank-o-box.com/
    HOME
    In this battle/game you post something and then someone works out the AS for that effect okay they then post what they want the others to work out.

    First challenge: Work out how to throw something and make them land back on the ground again. like in defen your castle (BTW I already know how to do this but I want yous to give it a go)


  • No, we love both's equally :)


  • :!: your fast :cool:

    ok you win your turn ;)


  • :jag: :cyclops: :gas:


  • no problem, I swfed them, uploaded them and here are the links:
    http://www.digitalhalo.de/kirupa/asbattlegame/Pom.swf
    http://www.digitalhalo.de/kirupa/asbattlegame/mine.swf
    http://www.digitalhalo.de/kirupa/asbattlegame/Voetsjoeba.swf

    I have hidden a little easteregg in mine


  • I felt free to add some features like boucing
    yarray = ;
    Lord of the Rings Games Workshop Tabletop Battle Game @ Lord of ::
    Lord of the Rings Games Workshop Tabletop Battle Game in our Lord of the Rings Shop.
    http://www.lotrfanshop.com/lotrshop/gamews.asp
    HOME
    xarray = ;
    createEmptyMovieClip("ball", 100);
    _root.ball.lineStyle(40,0, 100);
    _root.ball.moveTo(19.5, -20);
    _root.ball.lineTo(20.5, -20);
    _root.ball._x = 255;
    createEmptyMovieClip("earth", 50);
    earth.lineStyle(1, 0x009900, 100);
    earth.lineTo(800, 0);
    earth.lineTo(800, -1000);
    earth.moveTo(0, 0);
    earth.lineTo(0, -1000);
    earth._y = 600;
    _root.ball.onPress = function() {
    _root.ball.startDrag(false, 0, -1000, 800-_root.ball._width/2, earth._y);
    drag = true;
    };
    _root.ball.onRelease = _root.ball.onReleaseOutside=function () {
    _root.ball.stopDrag();
    drag = false;
    };
    _root.onEnterFrame = function() {
    if (drag != true) {
    yarray = [_root.ball._y];
    xarray = [_root.ball._x];
    _root.ball._y += _root.ball.vy;
    _root.ball._x += _root.ball.vx;
    _root.ball.vy = (_root.ball.vy*49)/50+1;
    _root.ball.vx = (_root.ball.vx*49)/50;
    if (_root.ball._y>earth._y) {
    _root.ball._y = earth._y;
    _root.ball.vy = -Math.floor(_root.ball.vy/3)
    _root.ball.vx=_root.ball.vx*9/10
    }
    if (_root.ball._x>_root.earth._width-_root.ball._width/2) {
    _root.ball._x = _root.earth._width-_root.ball._width/2;
    _root.ball.vx = -Math.floor(_root.ball.vx/3)
    _root.ball.vy=_root.ball.vy*9/10
    }
    if (_root.ball._x<0) {
    _root.ball._x = 0;
    _root.ball.vx = -Math.floor(_root.ball.vx/3)
    _root.ball.vy=_root.ball.vy*9/10
    }
    }
    };
    _root.onMouseMove = function() {
    if (drag == true) {
    xarray.unshift(_root.ball._x);
    yarray.unshift(_root.ball._y);
    if (xarray.length>3) {
    xarray.splice(3, xarray.length-3);
    yarray.splice(3, yarray.length-3);
    }
    _root.ball.vx = (xarray[0]-xarray[2])/3;
    _root.ball.vy = (yarray[0]-yarray[2])/3;
    }
    };

    :D too late pom


  • ground_pos = 300 ;

    this.createEmptyMovieClip("canon", -50) ;
    canon.lineStyle(1, 0, 100) ;
    canon.beginFill(0, 100) ;
    canon.lineTo(50, 0) ;
    canon.lineTo(50, 50) ;
    canon.lineTo(0, 50) ;
    canon.endFill() ;
    canon._y = ground_pos - 50 ;

    this.createEmptyMovieClip("projectile", -49)._visible = 0 ;
    projectile.lineStyle(10, 0, 100) ;
    projectile.lineTo(.45, .15) ;

    gravity = 2 ;
    function throwProjectile () {
    var dx = _xmouse - start_x ;
    var dy = _ymouse - start_y ;
    var force = Math.sqrt (dx*dx+dy*dy) ;
    var angle = Math.atan2 (dy, dx) ;
    dep ++ ;
    var mc = projectile.duplicateMovieClip ("p"+dep, dep) ;
    mc._x = canon._x ;
    mc._y = canon._y ;
    mc.vx = -dx / 3 ;
    mc.vy = -dy / 3 ;

    mc.onEnterFrame = function () {
    this._x += this.vx ;
    this._y += this.vy ;
    trace(this.vy); this.vy += gravity ;
    if (this._y > ground_pos) {
    this._y = ground_pos ;
    delete this.onEnterFrame ;
    }
    }
    }
    canon.onPress = function () {
    start_x = _xmouse ;
    start_y = _ymouse ;
    }
    canon.onRelease = canon.onReleaseOutside = throwProjectile ;Click the canon, and release.


  • New challenge

    This effect
    http://www.newgrounds.com/portal/view.php?id=129580
    You can draw the pumpkin and stuffs


  • well, I thought about making the task a little bit harder by letting you search around a little bit ;) ! 10 points for Voetsjoeba :P
    Yes I think the bar is more difficult, that's why I picked it. wouldn't it be too boring if we always choose scripts, where everybody knows how to do it on the first view?
    The harder you try, the bigger the success if you reached it!
    I've already a vague idea how to do it, but nothing concrete.


  • Created this quickly, for myself actually, to see if I could do something like that. The arrow isn't too smart though :P

    d = 0;
    dotsize = 10;
    boundary = {x:350, y:250, w:350, h:350};
    Math.toDegrees = function(radians) {
    return radians*180/Math.PI;
    };
    MovieClip.prototype.drawBoundary = function() {
    var k = boundary;
    var b = dotsize/2;
    with (this) {
    lineStyle(1, 0x000000, 100);
    moveTo(-k.w/2-b, -k.h/2-b);
    lineTo(k.w/2+b, -k.h/2-b);
    lineTo(k.w/2+b, k.h/2+b);
    lineTo(-k.w/2-b, k.h/2+b);
    lineTo(-k.w/2-b, -k.h/2-b);
    _x=k.x, _y=k.y;
    }
    };
    MovieClip.prototype.makeLine = function(l, x, y) {
    with (this) {
    lineStyle(1, 0x000000, 100);
    lineTo(l, 0);
    lineTo(l/2+l/4, l/4);
    moveTo(l, 0);
    lineTo(l/2+l/4, -l/4);
    _x=x, _y=y;
    }
    };
    MovieClip.prototype.makeGuy = function(x, y) {
    Key.addListener(this);
    with (this) {
    lineStyle(dotsize, 0x000000, 50);
    lineTo(.15, .45);
    lineStyle(1, 0x000000, 100);
    _x=x, _y=y;
    }
    };
    this.createTextField("win", d++, boundary.x-20, boundary.y, 70, 20);
    this.createEmptyMovieClip("run", d++).makeLine(10, 350, 250);
    this.createEmptyMovieClip("guy", d++).makeGuy(400, 260);
    this.createEmptyMovieClip("boundaryLines", d++).drawBoundary();
    guy.onEnterFrame = function() {
    //guy.onKeyDown = function() {
    if (Key.isDown(Key.UP) && this._y-dotsize/2>boundary.y-boundary.h/2) {
    this._y -= dotsize;
    }
    if (Key.isDown(Key.DOWN) && this._y+dotsize/2 this._y += dotsize;
    }
    if (Key.isDown(Key.LEFT) && this._x-dotsize/2>boundary.x-boundary.w/2) {
    this._x -= dotsize;
    }
    if (Key.isDown(Key.RIGHT) && this._x+dotsize/2 this._x += dotsize;
    }
    };
    run.onEnterFrame = function() {
    if (guy._x if (this._x+this._width+dotsize/2 this._x += dotsize*1.5;
    }
    } else {
    if (this._x-dotsize/2>boundary.x-boundary.w/2) {
    this._x -= dotsize*1.5;
    }
    }
    if (guy._y if (this._y+this._height+dotsize/2 this._y += dotsize*1.5;
    }
    } else {
    if (this._y-dotsize/2>boundary.y-boundary.h/2) {
    this._y -= dotsize*1.5;
    }
    }
    if (this.hitTest(guy)) {
    delete this.onEnterFrame;
    win.text = "You win !";
    }
    };


  • That's not what I had in mind... All right! :D


  • hey, this sounds like fun. I'm in.


  • @dencioust: was that what you intended?


  • ouch! (to myself:"...remember: always google first if you find something you don't know...")

    I guess he meant that
    http://www.ebaumsworld.com/castle.html

    (anyway I guessed something like that before (only the castle thing was irritating)
    @pom: you'd better be fast now!


  • i win i win :D


    MovieClip.prototype.drawCircle = function(x, y, theColor) {
    this.moveTo(Math.cos(0)*5+x, Math.sin(0)*5+y);
    this.lineStyle(0, 0x000000, 0);
    this.beginFill(theColor, 100);
    for (var radians = 0; radians this.lineTo(Math.cos(radians)*5+x, Math.sin(radians)*5+y);
    }
    this.endFill();
    };
    MovieClip.prototype.makeThing = function(num) {
    this.theColor = Math.round(Math.random()*255);
    this.drawCircle(-25, 0, this.theColor);
    this.lineStyle(3, this.theColor, 100);
    this.moveTo(-25, 0);
    this.lineTo(25, 0);
    this.drawCircle(25, 0, this.theColor);
    this._x = 10*num;
    this._y = 100;
    this._rotation = 20*num;
    this._xscale = this._yscale=10*num;
    this._alpha = 10+(90/_root.count)*num;
    this.onEnterFrame = function() {
    this._rotation += (_root._xmouse-300)/50;
    };
    };
    _root.createTextField("input_txt", 0, 290, 80, 20, 20);
    input_txt.type = "input";
    input_txt.border = true;
    input_txt.maxChars = 2;
    input_txt.restrict = "0-9";
    _root.createEmptyMovieClip("button_mc", 1);
    button_mc._x = 290;
    button_mc._y = 100;
    button_mc.createTextField("text_txt", 0, -45, 0, 100, 20);
    button_mc.text_txt.text = "Go: A numder 5-50";
    button_mc.text_txt.selectable = false;
    button_mc.onPress = function() {
    if (Number(input_txt.text)>=5 && Number(input_txt.text)<=50) {
    _root.count = Number(input_txt.text);
    for (var j = 0; j<_root.count; j++) {
    _root.createEmptyMovieClip("thing"+j, j);
    _root["thing"+j].makeThing(j);
    }
    }
    };


    :D


  • Played around with pom's code a bit ...


    walls = ;
    gravity = 2;
    bulletsize = 10;
    wallStickyNess = 1.7;
    ground = {x:350, y:300};
    bounce = gravity-(gravity/9);
    MovieClip.prototype.makeCannon = function(sze, x) {
    with (this) {
    lineStyle(1, 0, 100);
    moveTo(-sze, -sze);
    beginFill(0, 100);
    lineTo(sze, -sze);
    lineTo(sze, sze);
    lineTo(-sze, sze);
    lineTo(-sze, -sze);
    endFill();
    _x = x;
    _y = ground.y-sze+bulletsize/2;
    }
    };
    MovieClip.prototype.makeBullet = function() {
    with (this) {
    _visible = 0;
    lineStyle(bulletsize, 0, 100);
    lineTo(.45, .15);
    }
    };
    MovieClip.prototype.makeWall = function(w, h, x, y) {
    walls.push(this);
    with (this) {
    lineStyle(0, 0, 100);
    moveTo(-w/2, -h/2);
    beginFill(0, 100);
    lineTo(w/2, -h/2);
    lineTo(w/2, h/2);
    lineTo(-w/2, h/2);
    lineTo(-w/2, -h/2);
    endFill();
    _x=x, _y=y;
    }
    };
    this.createEmptyMovieClip("canon", -50).makeCannon(25, ground.x);
    this.createEmptyMovieClip("leftWall", -49).makeWall(10, 50, ground.x-200, ground.y-200);
    this.createEmptyMovieClip("rightWall", -48).makeWall(10, 50, ground.x+200, ground.y-200);
    this.createEmptyMovieClip("projectile", -47).makeBullet();
    function throwProjectile() {
    dep++;
    var dx = _xmouse-start_x;
    var dy = _ymouse-start_y;
    var force = Math.sqrt(dx*dx+dy*dy);
    var angle = Math.atan2(dy, dx);
    var mc = projectile.duplicateMovieClip("p"+dep, dep);
    mc._x = canon._x;
    mc._y = canon._y;
    mc.xi = 3;
    mc.yi = 3;
    mc.vx = -dx/mc.xi;
    mc.vy = -dy/mc.yi;
    mc.hazHitWall = 0;
    mc.onEnterFrame = function() {
    this._x += this.vx;
    this._y += this.vy;
    this.vy += gravity;
    for (all in walls) {
    if (this.hitTest(walls[all])) {
    this.xi *= wallStickyNess;
    this.hazHitWall = 1;
    walls[all]._x>kanon._x ? this.vx=dx/this.xi : this.vx=-dx/this.xi;
    }
    }
    if (this._y>ground.y) {
    this.yi *= bounce;
    this.xi *= bounce;
    this._y = ground.y;
    this.vy = -dy/this.yi;
    this.hazHitWall ? this.vx=dx/this.xi : this.vx=-dx/this.xi;
    if (this.vy>-1) {
    delete this.onEnterFrame;
    }
    }
    };
    }
    canon.onPress = function() {
    start_x = _xmouse;
    start_y = _ymouse;
    };
    canon.onRelease = canon.onReleaseOutside=throwProjectile;


  • OK, so I want the next one to set up a target that you have to reach, horizontal or vertical, with an accurate collision test if possible :)


    And I want planes to fly over, dropping bombs occasionally, , and people running on the ground, and... :trout:


  • I can't even find it :P


  • The reason why McGiver won is because his effect is the exact effect I was looking for. This isn't really a battle its a game


  • I would say next task:
    the http://www.bit-101.com/lab.html file 11.10.02
    the bar with the privot point thing.


  • I am in too :D

    but... who had the last turn??? Voetsjoeba?

    did he meet pom turms?
    Voetsjoeba: then say the next challenge ;)


  • ok but not now am going to bed :P

    I need my sleep :sleep:


  • I want you guys to make some too so I can learn :)


  • its got a bit messy :P

    MovieClip.prototype.drawCircle = function(x, y) {
    this.moveTo(Math.cos(0)*5+x, Math.sin(0)*5+y);
    this.lineStyle(0, 0x000000, 0);
    this.beginFill(0x000000, 100);
    for (var radians = 0; radians this.lineTo(Math.cos(radians)*5+x, Math.sin(radians)*5+y);
    }
    this.endFill();
    };
    MovieClip.prototype.makeThing = function(num) {
    this.drawCircle(-25, 0);
    this.lineStyle(3, 0x000000, 100);
    this.moveTo(-25, 0);
    this.lineTo(25, 0);
    this.drawCircle(25, 0);
    this._x = 10*num;
    this._y = 100;
    this._rotation = 20*num;
    this._xscale = this._yscale=10*num;
    this._alpha = 10+(90/_root.count)*num;
    this.num = num;
    this.onEnterFrame = function() {
    this._rotation += (_root._xmouse-300)/50;
    var red = 127*(1+Math.sin(this.num/10+(this.red += incr_red)));
    var green = 127*(1+Math.sin(this.num/10+(this.green += incr_green)));
    var blue = 127*(1+Math.sin(this.num/10+(this.blue += incr_blue)));
    var colRand = red << 16 green << 8 blue;
    var c = new Color(this);
    c.setRGB(colRand);
    };
    };
    incr_red = Math.random()/10;
    incr_green = Math.random()/10;
    incr_blue = Math.random()/10;
    _root.createTextField("input_txt", 0, 290, 80, 20, 20);
    input_txt.type = "input";
    input_txt.border = true;
    input_txt.maxChars = 2;
    input_txt.restrict = "0-9";
    _root.createEmptyMovieClip("button_mc", 1);
    button_mc._x = 290;
    button_mc._y = 100;
    button_mc.createTextField("text_txt", 0, -45, 0, 100, 20);
    button_mc.text_txt.text = "Go: A numder 5-50";
    button_mc.text_txt.selectable = false;
    button_mc.onPress = function() {
    if (Number(input_txt.text)>=5 && Number(input_txt.text)<=50) {
    _root.count = Number(input_txt.text);
    for (var j = 1; j<_root.count+1; j++) {
    _root.createEmptyMovieClip("thing"+j, j);
    _root["thing"+j].makeThing(j);
    }
    _root.createEmptyMovieClip("background_mc", 0);
    var red = Math.round(Math.random()*255);
    var green = Math.round(Math.random()*255);
    var blue = Math.round(Math.random()*255);
    var colRand = red << 16 green << 8 blue;
    background_mc.beginFill(colRand, 100);
    background_mc.lineTo(Stage.width, 0);
    background_mc.lineTo(Stage.width, Stage.height);
    background_mc.lineTo(0, Stage.height);
    background_mc.endFill();
    }
    };


    :D


  • Lol :P


  • its about bouncing DNA :P
    :h:



    well i dunno thay say make DNA so i make DNA :D


    @McGiver I will be add the color thing soon


  • Lol :P


  • well, i guess it IS too hard for most peops here.
    maybe someone select something easier


  • redo the rotation (using the mouse) of the dns
    add the random colors to background and dns?
    and the number thing


  • Hehe, I used hazHitWall (z is a s), but it got filtered .. I'll change it to hazHitWall.


  • Ok seeing no one is saying I win :(
    I will say I win :bad: and call the next challenge

    Challenge 3

    ............. some thing I can make too!?! :sleep: ...................
    A man that you can move around with your keybord/mouse. Then there is also a thing moving around randomly and avoiding the man a bit. Where the man hits the thing you win…a kind of hunt thing.


    So will that do? :}


  • I'm sure :P

    The navigation is in that structure: 02 - OCT - 11


  • does it have to be reflected from anywher, does it have to fly in x and y direction, or simply accellerate the ball with your cursor and make it come with gravity? AS only or predrawn flash allowed?


  • No-one?


  • Yeah, I wasn't too sure either, I don't know that 'Defend your castle' thing :-


  • Wowow, what is this thread about ? Is this a battle or a game ? Is this about DNA or bouncing ?? :h:


  • What kind of battle is this???

    Anyway, Voetsjoeba, I really like what you did :love:


  • what exactly is to be done?
    shall we redo the rotation (using the mouse) of the dns ?
    add the random colors to background and dns?
    redo the complete footer???
    or just something specific like the 3d rotation?
    (I guess here is somebody who want's us to rewrite his footer in pure as? :h: :D :D


  • nice one @ master64.
    I think you will have to add some random cycling colors


  • I think bit101 is always a good inspiration for things you want others to do :azn:
    try redo the privot point thing
    http://www.bit-101.com/lab.html
    11. oktober 02

    @pom: asking bit is NOT allowed!


  • Although Pom and VoetsJebas were good McGivers was the one I wanted so he wins. Next Go.Easy one. Try figure out how I done my footer


  • Originally posted by Voetsjoeba
    Why can't you just say 02 OCT 11 ? Ya sure it's not 11 oct 2002? :sure:


  • haha, I like mine most ;)

    just a joke


  • No I liked what you did MORE!! :scream:


  • well, i just anounced myself to be the winner ;)
    (denacioust didn't say anything more, Pom's was a nice one, but he misunderstood the task (I did so too, until I found the game dena referred to) and Voetsjoeba's was a change of Pom's with some pinball elements added)

    so if nobody else claims to be the winner ;) , I do :P

    the task:
    try redo the privot point thing
    http://www.bit-101.com/lab.html
    11. oktober 02


  • is there no one abled to do it, or just no one willing to do it?


  • Why can't you just say 02 OCT 11 ? We use a different date system here in Belgium so it's quite confusing :P That bar seems quite hard to do ...


  • confused me too. :D

    btw: how about a new rule:
    if no one get's one fitting to the demanded task, the person who set up the task has to offer an own one, within 2 days.
    If he is abled to do that, he earns one point.
    after that anyone availible dan take over and set up a new task.


  • I'm totally blank. Well not about the angles, but about the physics.


  • Yeah, I'm getting confused too.

    Thanks pom, I really like what you did too :love:


  • Well I can't test your codes coz I'm working on Flash 5.





  • Where's The Advantage In Windows Genuine Advantage?
    Stocks Bounce After S&P Joins Bear Market

    #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about The AS Battle Game. , Please add it free.
  • how could this happen please help i 039 m confused
  • please help me with my msn messenger
  • can you video chat through msn on a mac
  • how do you downlad msn
  • cant open delete messages in hotmail since it got its new look javascript error help
  • what year did was myspace invented
  • where can i find cool msn robots that swear and fight back
  • what does it mean when a person write like this
  • does anyone play games on msn 039 s live search com
  • unblock myspace at home
  • is setting up a fake myspace a deal breaker
  • unblock myspace on home computer
  • if one deletes someone off their msn contact list and eventually re add them do they get a message saying
  • is msn plus a virus
  •  
  • how do you create your first email account such as
  • can i please get a msn messenger help
  • why does myspace have so many ads
  • hello i 039 m italian can you give me your contact msn
  • is it possible to have an email in your inbox sent from your email address that you did not send to yourself
  • how can i delete friends from msn spaces what do i click and where
  • any problems with hotmail recently
  • can 039 t find the server at g live com
  • are my blocked contacts msn contacts able 2 see the yellow star next to my name each time i update my space
  • how to solve this problem on windows live messenger beta 2009
  • any msn hotmail names you guys can think of
  • msn instant messages some fail to deliver
  • they can tell they 039 ve been blocked on my msn messenger
  • is there a way you can do this for myspace
  • About us |Contact us |Advertisement |Site map |Exchange links
    Copyright© 2008polala.com All Rights Reserved