A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 30

Thread: Proposed open battle :: AS Battle

  1. #1
    Member
    Join Date
    Aug 2005
    Location
    london/Newcastle UK
    Posts
    33

    Proposed open battle :: AS Battle

    Hi guys,

    I don't know how well this will go down, but for the coders amongst us it should turn out pretty interesting (i hope!)

    RULES:
    1) Only allowed to change a max of 2 lines of code per round/volley
    2) AS2

    I'll start us with the obvious...

    Code:
    _root.createEmptyMovieClip ("mc_1", 1);
    Regards,

    Steve Richardson
    Adequately Average - It's Averagely Adequate!

  2. #2
    M.D. mr_malee's Avatar
    Join Date
    Dec 2002
    Location
    Shelter
    Posts
    4,139
    i couldn't resist, sorry.

    code:

    _root.createEmptyMovieClip ("mc_1", 1);
    mc_1.removeMovieClip()

    lather yourself up with soap - soap arcade

  3. #3
    Cichlisuite noiselab's Avatar
    Join Date
    Nov 2005
    Location
    Seattle
    Posts
    189
    Quote Originally Posted by noiselab
    Ok I'm sorta bad at action script, but I will contribute :

    code:

    _root.createEmptyMovieClip ("mc_1", 1);
    mc_1.removeMovieClip();
    _root.createEmptyMovieClip ("flashkit", 1);
    loadMovie("flashkit.swf", flashkit);
    tellTarget("flashkit) {
    gotoAndPlay(2);
    }

    Tested in Flash, doesn't produce an error code, so i guess it's valid.

  4. #4
    Senior Member Dricciotti's Avatar
    Join Date
    Aug 2002
    Posts
    2,988
    ^^ I thought you were only allowed to change two lines of code.

    I think the rules and your intentions for this battle need to be clearer sparkysteve

  5. #5
    ·»¤«· >flashl!ght<'s Avatar
    Join Date
    Jun 2003
    Posts
    746
    Agreed, clarification on the purpose and perhaps more detailed rules could help. Good idea though, if we can figure out how to make this work...

    noiselab -
    How could that code not produce an error? You're not terminating you string in the tellTarget... additionally, tellTarget is like AS 0... it's deprecated AS 1.0

    code:

    _root.createEmptyMovieClip ("mc_1", 1);
    mc_1.swapDepths(-1);
    mc_1.removeMovieClip(); //haha! trumped! (hint: you can't remove a negative depth MC)

    Last edited by >flashl!ght<; 01-24-2006 at 12:24 PM.
    >flashl!ght<
    All the normal names were taken.
    Ron Paul was right.

  6. #6
    Member
    Join Date
    Aug 2005
    Location
    london/Newcastle UK
    Posts
    33
    ok, i kinda just wanted to try this out to see where it would get us... kind of like a rollercanvas type thing but using code instead of images. what do you guys reckon... how could we make it work?
    Regards,

    Steve Richardson
    Adequately Average - It's Averagely Adequate!

  7. #7
    ·»¤«· >flashl!ght<'s Avatar
    Join Date
    Jun 2003
    Posts
    746
    Well, it's up to you, but I would say we need some sort of goal, like "to create an interactive bot" or "a random mess of iterative explosions" or something. But may be not? Keep it all dynamic, no loadMovie or loading of external data aloud, no bad code(test you're code first), and can we use Flash 8 features?

    Really, I think as long as people use a little common sense and adhere to the only two lines rule, it could be cool.
    >flashl!ght<
    All the normal names were taken.
    Ron Paul was right.

  8. #8
    2008 Man of the Year JWin's Avatar
    Join Date
    Aug 2005
    Location
    here
    Posts
    768
    this might be more relevant in the actionscript forum as opposed to the design forum...just a thought

    SAMedia Blog (general bs) :: jwinmedia (my music site)
    "Think of an advertisement where the product you're marketing is Jesus!"
    -From a work for hire ad

  9. #9
    Senior Member Shotsy247's Avatar
    Join Date
    Apr 2001
    Location
    Be there in a minute!
    Posts
    1,386
    Not if we use AS to create a design.

    code:
    _root.createEmptyMovieClip ("mc_1", 1);
    mc_1.swapDepths(-1);
    mc_1.removeMovieClip(); //haha! trumped! (hint: you can't remove a negative depth MC)
    for (i = 0; i < 10; i++){ mc_1.lineStyle(1, 0xff00ff / i, 100); mc_1.lineTo(100, i * i - 3); mc_1.moveTo(0, 0);}



    Now all of this additional code is on one line, does this count?

    _t
    I don't feel tardy.

  10. #10
    Member
    Join Date
    Aug 2005
    Location
    london/Newcastle UK
    Posts
    33
    well i intended it as a design thing using AS. Every 'turn' is a max of 2 lines of script which hopefully will give us some random happenings. The object of the 'battle' is to create a design which flows from everyone elses script. - does this make sense?
    Regards,

    Steve Richardson
    Adequately Average - It's Averagely Adequate!

  11. #11
    ·»¤«· >flashl!ght<'s Avatar
    Join Date
    Jun 2003
    Posts
    746
    Makes sense, just might need more specific rules. IMHO mashing multiple lines of code into one should not be done... this will of course result in people having to play of off each others code... for instance, someone starts a for loop, someone else adds something inside it, another person adds something inside it, someone else finishes it off, someone adds som logic around it, ect.

    2 lines. No code mashing. Can we slightly edit others lines of code? (the only thing I edited was the formatting of the smashed code)
    code:

    _root.createEmptyMovieClip("mc_1", 1);
    mc_1.swapDepths(-1);
    mc_1.removeMovieClip();//haha! trumped! (hint: you can't remove a negative depth MC)
    function lines(mc_1) {
    for (i = 0; i < 10; i++) {
    mc_1.lineStyle(1, 0xff00ff / i, 100);
    mc_1.lineTo(100, i * i - 3);
    mc_1.moveTo(0, 0);
    }
    }

    Last edited by >flashl!ght<; 01-24-2006 at 02:05 PM.
    >flashl!ght<
    All the normal names were taken.
    Ron Paul was right.

  12. #12
    Senior Member Shotsy247's Avatar
    Join Date
    Apr 2001
    Location
    Be there in a minute!
    Posts
    1,386
    code:
    _root.createEmptyMovieClip("mc_1", 1);
    mc_1.swapDepths(-1);
    mc_1.removeMovieClip();//haha! trumped! (hint: you can't remove a negative depth MC)
    function lines(mc_1) {
    for (i = 0; i < 10; i++) {
    mc_1.lineStyle(1, 0xff00ff / i, 100);
    mc_1.lineTo(100, i * i - 3);
    mc_1.moveTo(0, 0);
    }
    }
    for (i=0; i < 10 ; i++){
    }



    Nice addition flashl!ght.

    I think we should be allowed to edit previous code, but then I guess that's up to sparkysteve.

    _t
    Last edited by Shotsy247; 01-24-2006 at 03:04 PM.
    I don't feel tardy.

  13. #13
    ·»¤«· >flashl!ght<'s Avatar
    Join Date
    Jun 2003
    Posts
    746
    code:

    _root.createEmptyMovieClip("mc_1", 1);
    mc_1.swapDepths(-1);
    mc_1.removeMovieClip();
    function lines(mc_1) {
    for (i = 0; i < 10; i++) {
    mc_1.lineStyle(1, 0xff00ff / i, 100);
    mc_1.lineTo(100, i * i - 3);
    mc_1.moveTo(0, 0);
    }
    }
    for (i = 0; i < 10; i++) {
    var x = random(Stage.width);
    var y = random(Stage.height);
    }

    >flashl!ght<
    All the normal names were taken.
    Ron Paul was right.

  14. #14
    Member
    Join Date
    Aug 2005
    Location
    london/Newcastle UK
    Posts
    33
    Nice one flashl!ght.

    As for changing other people's codes i think it might confuse things but maybe you can but thats your 'turn' so to speak.

    This is the first place i've seen this done so i can't even look anywhere else and see what rules they did!
    Code:
    _root.createEmptyMovieClip("mc_1", 1);
    
    mc_1.swapDepths(-1);
    
    mc_1.removeMovieClip();
    
    function lines(mc_1) {
    
    	for (i = 0; i < 10; i++) {
    
    		mc_1.lineStyle(1, 0xff00ff / i, 100);
    
    		mc_1.lineTo(100, i * i - 3);
    
    		mc_1.moveTo(0, 0);
    
    	}
    
    }
    
    for (i = 0; i < 10; i++) {
    
    	var x = random(Stage.width);
    
    	var y = random(Stage.height);
    mc_1.lineStyle(random(0x000600))
    mc_1.lineTo(100,200);
    }
    Actually sayin that, yeah f-it... change code if you want.... just tell when you do it
    Regards,

    Steve Richardson
    Adequately Average - It's Averagely Adequate!

  15. #15
    Senior Member Shotsy247's Avatar
    Join Date
    Apr 2001
    Location
    Be there in a minute!
    Posts
    1,386
    code:
    _root.createEmptyMovieClip("mc_1", 1);

    mc_1.swapDepths(-1);

    mc_1.removeMovieClip();

    function lines(mc_1) {

    for (var i = 0; i < 10; i++) {

    mc_1.lineStyle(1, 0xff00ff / i, 100);

    mc_1.lineTo(100, i * i - 3);

    mc_1.moveTo(0, 0);

    }

    }

    for (var i = 0; i < 10; i++) {

    var x = random(Stage.width);

    var y = random(Stage.height);
    mc_1.lineStyle(random(0x000600))
    mc_1.lineTo(100,200);
    }



    I added var to each of the for loops.
    I don't feel tardy.

  16. #16
    ·»¤«· >flashl!ght<'s Avatar
    Join Date
    Jun 2003
    Posts
    746
    code:

    _root.createEmptyMovieClip("mc_1", 1);
    mc_1.swapDepths(-1);
    mc_1.removeMovieClip();
    function lines(mc_1) {
    for (var i = 0; i < 10; i++) {
    mc_1.lineStyle(1, 0xff00ff / i, 100);
    mc_1.lineTo(100, i * i - 3);
    mc_1.moveTo(0, 0);
    }
    }
    for (var i = 0; i < 10; i++) {
    var x = random(Stage.width);
    var y = random(Stage.height);
    mc_1.lineStyle(random(550),random(0x000600),random (100));
    mc_1.lineTo(x, y);
    }




    Changed lineTo(100,200) to lineTo(x,y), and changed lineStyle so it has all required arguments

    Take a look at it now... wooosh!
    Last edited by >flashl!ght<; 01-24-2006 at 07:03 PM.
    >flashl!ght<
    All the normal names were taken.
    Ron Paul was right.

  17. #17
    Member
    Join Date
    Aug 2005
    Location
    london/Newcastle UK
    Posts
    33
    I like!

    Code:
    _root.createEmptyMovieClip("mc_1", 1);
    
    mc_1.swapDepths(-1);
    
    mc_1.removeMovieClip();
    
    function lines(mc_1) {
    
    	for (var i = 0; i < 10; i++) {
    
    		mc_1.lineStyle(1, 0xff00ff / i, 100);
    
    		mc_1.lineTo(100, i * i - 3);
    
    		mc_1.moveTo(0, 0);
    
    	}
    
    }
    
    for (var i = 0; i < 10; i++) {
    
    	var x = random(Stage.width);
    
    	var y = random(Stage.height);
    
    	mc_1.lineStyle(random(550),random(0x000600),random  (100));
    
    	mc_1.lineTo(x, y);
    mc_1.onEnterFrame = function() {
        x = Math.round(Math.random(50))}
    }
    Regards,

    Steve Richardson
    Adequately Average - It's Averagely Adequate!

  18. #18
    supervillain gerbick's Avatar
    Join Date
    Jul 2000
    Location
    undecided.
    Posts
    18,986
    Are you guys going to make something with this?

    [ Hello ] | [ gerbick ] | [ Ω ]

  19. #19
    He has risen! lefteyewilly's Avatar
    Join Date
    Mar 2001
    Posts
    2,597
    i was just thinking the same thing...lol...Where's the images??!?!?!

  20. #20
    Member
    Join Date
    Aug 2005
    Location
    london/Newcastle UK
    Posts
    33
    hopefully.... it's a bit trial and error to be honest! - as i said earlier i have't seen this done anywhere before so hopefully this may be the beginning for something cool or then again it could be a disaster
    Regards,

    Steve Richardson
    Adequately Average - It's Averagely Adequate!

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center