A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Quite a rubbish script

  1. #1
    XRave tongxn's Avatar
    Join Date
    Apr 2005
    Location
    Somewhere near Here
    Posts
    870

    Quite a rubbish script

    I copied this script from a book of mine, it's supposed to make bubbles float upwards, but its manufunctioning again! (total count: 5)

    script as follows, I call the bubble snow and i added a invisible mc called control

    Code:
    //well this is the actionscript on "snow"
    onClipEvent (load) {
    	speed = random(5) + 2;
    	tint = random(10) - 5;
    }
    onClipEvent (enterFrame) {
    	this._y = this._y - random(2) - speed;
    	this._x = this._x + tint;
    	if (this._y > -10) {
    		this.removeMovieClip();
    	}
    }
    Code:
    //and this is the actionscript on "control"
    onClipEvent (load) {
    	i = 0
    	num = 5;
    }
    onClipEvent (enterFrame) {
    	for (p=0; p<num; p=p+1) {
    		_root.frame.swapDepths(i+num+1) ;
    		_root.snow.duplicateMovieClip("snow" + i, i);
    		_root.["snow" + i]._y = 930;
    		_root.["snow" + i]._x = random(920);
    		_root.["snow" + i]._xscale = speed*3;
    		_root.["snow" + i]._yscale = _root.["snow" + i]._xscale;
    		i = i+1;
    	}
    }
    so what in heaven's name is wrong?
    When you actually know what "OMG I have so much homework!" means, you won't want to be me.
    Xrave

  2. #2
    XRave tongxn's Avatar
    Join Date
    Apr 2005
    Location
    Somewhere near Here
    Posts
    870
    not meaning to pester but...
    When you actually know what "OMG I have so much homework!" means, you won't want to be me.
    Xrave

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