A Flash Developer Resource Site

Page 2 of 2 FirstFirst 12
Results 21 to 30 of 30

Thread: Proposed open battle :: AS Battle

  1. #21
    ·»¤«· >flashl!ght<'s Avatar
    Join Date
    Jun 2003
    Posts
    746
    Quote Originally Posted by gerbick
    Are you guys going to make something with this?
    It's just that writing code is alot more incospicuous to do during work than making an image of a pixel biplane blowing stuff up and dragons
    >flashl!ght<
    All the normal names were taken.
    Ron Paul was right.

  2. #22
    ·»¤«· >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);
    mc_1.onEnterFrame = function() {
    x = Math.round(Math.random(50));
    };
    }
    MovieClip.prototype.easeTo = function(prop, targetValue, ease) {
    this[prop] += (finalValue-this[prop])/ease;
    };


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

  3. #23
    Senior Member Shotsy247's Avatar
    Join Date
    Apr 2001
    Location
    Be there in a minute!
    Posts
    1,386
    Quote Originally Posted by lefteyewilly
    i was just thinking the same thing...lol...Where's the images??!?!?!
    Just paste the code into Flash and test movie. Although that assumes that all people on Flashkit have access to Flash

    Perhaps, incremental screenshots should be created so people can see how this progresses????

    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);

    this.createEmptyMovieClip("holder_"+i, this.getNextHighestDepth());
    lines(this["holder_"+i]);

    mc_1.onEnterFrame = function() {
    x = Math.round(Math.random(50));
    }
    }

    MovieClip.prototype.easeTo = function(prop, targetValue, ease) {
    this[prop] += (finalValue-this[prop])/ease;
    }



    _t
    I don't feel tardy.

  4. #24
    ·»¤«· >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);
    this.createEmptyMovieClip("holder_"+i, this.getNextHighestDepth());
    lines(this["holder_"+i]);
    this["holder_"+i]._x = x;
    this["holder_"+i]._y = y;
    mc_1.onEnterFrame = function() {
    x = Math.round(Math.random(50));
    };
    }
    MovieClip.prototype.easeTo = function(prop, targetValue, ease) {
    this[prop] += (finalValue-this[prop])/ease;
    };

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

  5. #25
    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(550), random(0x000600), random(100));
    mc_1.lineTo(x, y);
    this.createEmptyMovieClip("holder_"+i, this.getNextHighestDepth());
    lines(this["holder_"+i]);
    this["holder_"+i]._x = x;
    this["holder_"+i]._y = y;
    this["holder_"+i]._rotation = y;
    mc_1.onEnterFrame = function() {
    x = Math.round(Math.random(50));
    };
    }
    MovieClip.prototype.easeTo = function(prop, targetValue, ease) {
    this[prop] += (finalValue-this[prop])/ease;
    };

    I don't feel tardy.

  6. #26
    ·»¤«· >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);
    this.createEmptyMovieClip("holder_"+i, this.getNextHighestDepth());
    lines(this["holder_"+i]);
    this["holder_"+i]._x = x;
    this["holder_"+i]._y = y;
    this["holder_"+i]._rotation = y;
    mc_1.onEnterFrame = function() {
    x = Math.round(Math.random()*50);
    this.easeTo("_x",55,6);
    };
    }
    MovieClip.prototype.easeTo = function(prop, finalValue, ease) {
    this[prop] += (finalValue-this[prop])/ease;
    };

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

  7. #27
    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(550), random(0x000600), random(100));
    mc_1.lineTo(x, y);
    this.createEmptyMovieClip("holder_"+i, this.getNextHighestDepth());
    lines(this["holder_"+i]);
    this["holder_"+i]._x = x;
    this["holder_"+i]._y = y;
    this["holder_"+i]._rotation = y;
    mc_1.onEnterFrame = function() {
    x = Math.round(Math.random()*50);
    this.easeTo("_x",55,6);
    if(this._x >= 55 - .25){};
    };
    }
    MovieClip.prototype.easeTo = function(prop, finalValue, ease) {
    this[prop] += (finalValue-this[prop])/ease;
    };

    this.createEmptyMovieClip("myNewClip", this.getNextHighestDepth());




    We need some more people to contribute to this. I know a lot of you out there know actionscript. Jump on in, the water's fine

    _t
    I don't feel tardy.

  8. #28
    Flash hates me. crashlanding's Avatar
    Join Date
    Nov 2003
    Location
    UK
    Posts
    439
    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);
    this.createEmptyMovieClip("holder_"+i, this.getNextHighestDepth());
    lines(this["holder_"+i]);
    this["holder_"+i]._x = x;
    this["holder_"+i]._y = y;
    this["holder_"+i]._rotation = y;
    mc_1.onEnterFrame = function() {
    x = Math.round(Math.random()*50);
    this.easeTo("_x",55,6);
    if(this._x >= 50){
    this.easeTo("_rotation",180,6);
    this.easeTo("_y",Stage.height/2,6);
    };
    };
    }
    MovieClip.prototype.easeTo = function(prop, finalValue, ease) {
    this[prop] += (finalValue-this[prop])/ease;
    };

    this.createEmptyMovieClip("myNewClip", this.getNextHighestDepth());



    Changed the if statement slightly...

    edit: hint - lines hasn't been called yet.

    call it. it looks cool.


    edit2: I've only just realised that this thread has been dead for weeks. Oh well. Looked interesting.
    Last edited by crashlanding; 02-07-2006 at 05:04 PM.
    "wen i found my gerbil dead my other gerbil was eating it i just cried and screamed"
    http://www.livescripts.net

    --------------------------------------------------------------------------------
    Last edited by some moderator : Today at 9:01 PM.

  9. #29
    Senior Member Shotsy247's Avatar
    Join Date
    Apr 2001
    Location
    Be there in a minute!
    Posts
    1,386
    Actually, lines has been called:

    lines(this["holder_"+i]);

    I agree tat it can be called with some variations to create some cool effects.

    _t
    I don't feel tardy.

  10. #30
    Member
    Join Date
    Aug 2005
    Location
    london/Newcastle UK
    Posts
    33
    yeah sorry guys... i got kinda busy and no-one was really taking much notice in this - apart from the obvious so i kind of just loas interest myslf.... maybe if someone has abetter idea of how to make this work there could be another shot at it?
    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