A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: falling err rather blowing snow

  1. #1
    Member
    Join Date
    Jun 2004
    Posts
    34

    falling err rather blowing snow

    Fooling around with the kirupa falling snow 2.0 script and understand it for the most part but am trying to figure out how I would go about changing it from up down to right to left as Im looking more for a moving effect.

    PHP Code:
    onClipEvent (load) {
        
    //specifies the size of the movie stage
        
    movieWidth 300;
        
    movieHeight 200;
        
        
    //variables that will modify the falling snow
        
    1+Math.random()*2;
        
    = -Math.PI+Math.random()*Math.PI;
        
        
    //giving each snowflake unique characteristics
        
    this._xscale this._yscale=50+Math.random()*100;
        
    this._alpha 75+Math.random()*100;
        
    this._x = -10+Math.random()*movieWidth;
        
    this._y = -10+Math.random()*movieHeight;
    }
    onClipEvent (enterFrame) {
        
    //putting it all together
        
    rad -= (k/180)*Math.PI;
        
    this._x -= Math.cos(rad);
        
    this._y += i;
        if (
    this._y>=movieHeight) {
            
    this._y = -5;
        }
        if ((
    this._x>=movieWidth) || (this._x<=0)) {
            
    this._x = -10+Math.random()*movieWidth;
            
    this._y = -5;
        }

    Thats what I have been using, Ive fooled around with the negative/positive values with no luck. Maybe its just late and Im tired but could someone possible point me in the right direction that would help change it so it would move from the right to left?

  2. #2
    Senior Member Sir Yendor's Avatar
    Join Date
    Sep 2001
    Location
    Over here
    Posts
    1,140
    Drag an instance of the Snow MC onto your stage. Click it to select it and rotate it 90 degrees. Do a test Movie to see how the snow falls it shouold either fall left ot right, or right to left. Now position the MC so the snow falls where you want it to.

  3. #3
    Member
    Join Date
    Jun 2004
    Posts
    34
    Had tried that before with no luck the snow falls from top to bottom no matter how often I rotate the movie clip.

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