Bubble « Design « Flash Tutorials

Home
Flash Tutorials
1.Actionscript Programming
2.Animals
3.Animation
4.Colors
5.Design
6.Effects
7.Game Cartoon
8.Humans
9.Models
10.Nature
11.Operations
12.Shapes
Photoshop Tutorials
Maya Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
Flash Tutorials » Design » Bubble 

Beneath this put the following code: thisBubble.yspeed = Math.random()*2+.2; thisBubble.onEnterFrame = function() { this._y -= this.yspeed; if (this._y<= 0) { this._y = 400; this._x = 10+Math.random()*mWidth; } if (this._x>=mWidth || this._x<=0) { this._y = 400; this._x = 10+Math.random()*mWidth; } }; } This code generates a random number for the _y speed of the bubble, followed by two 'if' statements. These check the bubble movie clips are on the stage, and if not will reset them to a random _x position, and a y position off the stage.

2. Draw a circle on the stage without any stroke. Make it of size 32×32.

w___w__w__.___ja___va_2_s_._c___o_m_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.