Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Thread: Spiraling Stars

  1. #1

    Spiraling Stars

    He is my first submission . I will probably have more updates on it soon. Currently, it is 24 lines.

    Stage.scaleMode= "noScale";
    function CreateCircle(Name,width){
    _root.depthvar++
    mc = _root.createEmptyMovieClip (Name,depthvar);
    mc.lineStyle(width/4,0x5797D7,30);
    mc.beginFill(0x48BCE1,50);
    for(var t=0;t<360;t+=10){
    if(t!=0) mc.lineTo((width*.75+width*.25*Math.sin(t*5*Math.PI/180))*Math.cos(t*Math.PI/180),(width*.75+width*.25*Math.sin(t*5*Math.PI/180))*Math.sin(Math.PI/180*t));
    else mc.moveTo((width*.75+width*.25*Math.sin(t*5*Math.PI/180))* Math.cos(t*Math.PI/180),(width*.75+width*.25*Math.sin(t*5*Math.PI/180))*Math.sin(Math.PI/180*t));
    }
    mc.endFill();
    return mc;
    }
    MovieClip.prototype.FollowPoint=function(x,y){
    this._x= this._x+(x-this._x)/5;
    this._y= this._y+(y-this._y)/5;
    }
    onEnterFrame=function(){
    dist=Math.sqrt((_xmouse-mc0_0._x)*(_xmouse-mc0_0._x)+(_ymouse-mc0_0._y)*(_ymouse-mc0_0._y));
    angle+=5;
    d<70 ? d=70 : d=dist/1.4;
    nodesToFollow = [[_xmouse+d* Math.cos(angle*Math.PI/180) , _ymouse+d*Math.sin(angle*Math.PI/180)],[_xmouse+d*Math.cos((angle+120)*Math.PI/180) , _ymouse+d*Math.sin((angle+120)*Math.PI/180)],[_xmouse+d*Math.cos((angle+260)*Math.PI/180) , _ymouse+d*Math.sin ((angle+260)*Math.PI/180)]];
    }
    for(var n=0;n<3;n++){
    mc = CreateCircle("mc"+n+"_0");
    mc.n=n;
    mc.onEnterFrame=function(){
    this.FollowPoint(nodesToFollow[this.n][0],nodesToFollow[ this.n][1]);
    }
    for(var n2=0;n2<10;n2++){
    mc2=CreateCircle("mc"+n+"_"+(n2+1),20);
    mc2.FollowMc=_root["mc"+n+"_"+n2];
    mc2._alpha=mc2._xscale=mc2._yscale=(7-n2)*(100/7)
    mc2.onEnterFrame = function(){
    this._rotation=angle;
    this.FollowPoint(this.FollowMC._x,this.FollowMC._y);
    }
    }
    }


    Please let me know what you think!
    -freeskier89
    Attached Files Attached Files
    Last edited by freeskier89; January 13th, 2006 at 08:16 PM.

  2. #2
    Very nice

  3. #3
    very "kool"

  4. #4
    Great stuff Freeskier!

  5. #5
    icio's Avatar
    3,810
    posts
    looks better in lowercase
    Nice
    "60% of the time it works... every time." -- Paul Rudd as Brian Fantana.

  6. #6
    Sweet
    Member #2 of the "I wont critique Timmytot's designs anymore" club.

  7. #7
    That's awesomeeeee.

    me.createSomethingNew(now);
    ...lurking around

  8. #8
    Thanks everyone! It is now 25 lines (added Stage.scaleMode="noScale")

  9. #9
    Smooooth!!!

  10. #10
    wow, nice effect!!!

  11. #11
    Wow!

  12. #12
    Really really nice effect.

    Just curious here, but isn't:
    Code:
    width*.75+width*.25
    exactly the same as
    Code:
    width
    ?
    Build a man a fire and he is warm for a day.
    Set a man on fire and he is warm for the rest of his life.

  13. #13

  14. #14
    Quote Originally Posted by Sammo
    Really really nice effect.

    Just curious here, but isn't:
    ActionScript Code:
    width*.75+width*.25


    exactly the same as ActionScript Code:
    width


    ?
    yes it is, but in my case it isn't because there is a multiplicative operation following "width*.75" ( Math.cos(...) . Kind of like:

    a*.75+a*.25*3 != a*3

    if width*.25 + width*.75 was in parenthesis, you would be right.

  15. #15
    TheCanadian's Avatar
    10,250
    posts
    Noo doot aboot it, eh?
    I said it once and I'll say it again, very nice .
    Proud Montanadian
    We tolerate living and breathing. And niches.

    Name Brand Watches

    Maybe getTimer() or TweenMax is the answer to your problem . . .

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012