A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [F8] PS3 dashboard done in AS2

  1. #1
    Senior Member
    Join Date
    Feb 2004
    Posts
    133

    [F8] PS3 dashboard done in AS2

    Hi guys!

    I´m pretty sure you have all seen the beautiful PS3 dashboard... I was wandering if there is a way to achieve that effect that goes in the background... sort of blurry curvy lines that cross the screen... THey have this gas/liquid feeling...

    Right now, I am working with this code, but it is not exactly what I want (by the way, I´ve this code here in this forum)...

    /*
    set up vars
    p = number of points along the line; more = smoother curve
    sx = start position of the wave
    ex end of the wave
    by = size of area
    wl = the water level
    wh = height of waves
    ws = speed of wave; negative numbers make it go right
    */
    for (var i = 0; i < 6; i++) {
    this.createEmptyMovieClip("wave" + i, i);
    var w:MovieClip = this["wave" + i];
    w.p = 45;
    w.sx = 0;
    w.ex = Stage.width;
    w.by = 1;
    w.wl = 10;
    w.wh = 35;
    w.ws = -(0 + ((random(10) / 2) + .1) / 5000);
    var Ld:String = String(i / 2);
    if (Ld.length > 0) {
    w.lh = 1;
    } else {
    w.lh = 0;
    }
    w.id = i;
    w.sy = w.lh + w.wh + w.wl;
    PI2 = Math.PI * 2;
    //w._alpha = random(45) + 25;
    //don't use alpha to CPU instensive try random colors instead
    w.linecolor = 0xBBBBBB
    //w.linecolor = random(255) << 16 | random(255) << 8 | random(200);
    w.onEnterFrame = function() {
    //begin with a clean canvas
    this.clear();
    this.lineStyle(this.lh,this.linecolor);
    for (x = 0; x < this.p; x++) {
    var r:Number = x / (this.p - 1);
    var px:Number = this.sx + r * (this.ex - this.sx);
    var py:Number = this.sy + this.wh * Math.sin(r * r * PI2 + getTimer() * this.ws);
    if (x == 0) {
    this.moveTo(px, py);
    }
    this.lineTo(px, py);
    }
    };
    }


    Any help will be much appreciated.

    See ya!

  2. #2
    Senior Member
    Join Date
    Feb 2004
    Posts
    133
    Any ideas?

    Any hint will be much appreciated...

  3. #3
    george_gaz
    Join Date
    Feb 2007
    Location
    UK
    Posts
    7
    Hello,

    This is some great code!

    Is there anyway to have three lines (for (var i = 0; i < 3; i++) {) but have a different specified colour for each line?

    The random one will create three different coloured lines but I am struggling to create three different colours chosen by me :-s

    Cheers

  4. #4
    Junior Member
    Join Date
    May 2009
    Posts
    1

    Talking Thanks!!!

    This was the first link to come up when I searched for 'Wavy Line Flash Tutorials' on Google...

    It's just what I was looking for!!!

    Whoever posted it is a Godsend!!!

    Thank-You SOOOO much!!!!

    Cate x

  5. #5
    Senior Member
    Join Date
    Apr 2004
    Location
    Toronto
    Posts
    115
    put it in a movieclip,

    then blur that clip and add color effects?
    No one will ever know how much you try, exept your self.. so suprize them.

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