[Smily Entry 1] - NodeDraw 1

  • I'm a bit late on this one, but here it is...
    So I managed to port my NodeDraw thingie into only 20 lines of code! I'll probably post more than one version, the next maybe being an interactive one :)
    It's using BitmapData to speed up the process so don't expect any details if you zoom in :P

    I excluded the arrays so it won't lag kirupa and/or make a long page, the arrays will be in the attachment txt, they should be on line 1 and 2

    WARNING: Very CPU intensive, it goes to the top while it's drawing. I made it
    a bit progressive so it doesn't freeze and you can cancel (close) it at any time. You have been warned!


    var bitmap:flash.display.BitmapData = new flash.display.BitmapData(800, 600, true, 0x000000);
    var b:MovieClip = _root.createEmptyMovieClip("b", _root.getNextHighestDepth());
    var c:MovieClip = _root.createEmptyMovieClip("c", _root.getNextHighestDepth());
    var l:MovieClip = c.createEmptyMovieClip("l", c.getNextHighestDepth());
    b.attachBitmap(bitmap, b.getNextHighestDepth());
    var i = 0;
    drawInt = setInterval(drawOne, 1);
    function drawOne() {
    for (var n = i+1; n var dist = Math.sqrt(Math.pow(px[i]-px[n], 2)+Math.pow(py[i]-py[n], 2));
    if (dist<100) {
    c.l.clear();
    c.l.lineStyle(1, (i+n)/2*0xFFFFFF/px.length, 50-dist);
    c.l.moveTo(px[i], py[i]);
    c.l.lineTo(px[n], py[n]);
    bitmap.draw(c);
    }
    }
    i++;
    if (i>px.length) {
    clearInterval(drawInt);
    }
    }


  • Yay, thanks to all! Especially Fez..uhm..I mean mlk :D


  • Great job man!

    I would have loved to try going for tracing a picture with it if it was not for the insanely large arrays required :)


  • cool! :D


  • wow. very well done. like wow


  • you hav done a good effort

    but i tried & copy paste this code in action panel & test it nothing is coming y


  • wow, that's awesome...


  • what the???? you get my vote !


  • wow, that is just amazing, Im gob smacked. Im loving it :love:


  • beautiful


  • Nice and shiny! ;)


  • i'm speechless...


  • nice!!!


  • Great job dude :thumb2:







  • #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 [Smily Entry 1] - NodeDraw 1 , Please add it free.