Bubbles Menu
1. Open new document in flash, size 400*400, fps = 30, background black.

2. IMPORTANT - On Publish Settings (Ctrl + Shift + F12), on Flash part, set Flash Player version on Flash Player 6, or this movie will not work.
3. Draw small circle somewhere on background.

4. Convert circle in to Movie Clip (F8)
5. Set instance name for MovieClip: mc
6. Write text for 2 buttons
7. Convert both text to Button (F8)


8. For button1 instance name is: menu1 and for button2: menu2


9. Add new layer for actionscript

10. On first frame of Actionscript Layer add this code:
fscommand("fullscreen", "false");
fscommand("allowscale", "false");
fscommand("showmenu", "false");
//
mc_num = 10;
menu_num = 2;
mc._visible = 0;
stageWidth = Stage.width;
stageHeight = Stage.height-60;
//
defX = stageWidth/2;
defY = stageHeight/2;
//
sizeWidth = _root.mc._width;
//
for (i=1; i<=mc_num; i++) {
duplicateMovieClip(_root.mc, "mc"+i, 12*i);
mc = _root["mc"+i];
mc._y = defY;
//
mc._x = sizeWidth*i+defX;
mc.PosX = mc._x;
mc.PosY = mc._y;
}
//
_root.meover = false;
//
for (i=1; i<=menu_num; i++) {
_root["menu"+i].onRollOver = function() {
_root.meover = true;
name = this._name;
num = name.substring(4, 6);
_root["menu"+num].gotoAndPlay(2);
for (i=1; i<=mc_num; i++) {
_root["mc"+i].PosX = _root["menu"+num]._x-12;
_root["mc"+i].PosY = _root["menu"+num]._y;
_root["mc"+i].gotoAndStop(2);
}
};
_root["menu"+i].onRollOut = function() {
_root.meover = false;
name = this._name;
num = name.substring(4, 6);
_root["menu"+num].gotoAndStop(1);
for (i=1; i<=mc_num; i++) {
_root["mc"+i].gotoAndStop(1);
}
};
_root["menu"+i].onRelease = function() {
name = this._name;
num = name.substring(4,6);
getURL(_root["urlLink"+num]);
};
}
//
//urlLink
urlLink1="";
11. On circle Movie Clip add this code:
onClipEvent (load) {
RamX = random(_root.stageWidth);
RamY = random(_root.stageHeight);
RamScale = 30+random(70);
OriSclae = 100;
spd1 = 0.04;
spd2 = 0.6;
}
onClipEvent (enterFrame) {
if (random(20) == 1) {
RamX = random(_root.stageWidth);
RamY = random(_root.stageHeight);
RamScale = 30+random(70);
}
if (!_root.meover) {
this._x = this._x+(RamX-this._x)*spd1;
this._y = this._y+(RamY-this._y)*spd1;
this._xscale = this._xscale+(RamScale-this._xscale)*spd1;
this._yscale = this._yscale+(RamScale-this._yscale)*spd1;
} else {
this._x = this._x+(PosX-this._x)*spd2;
this._y = this._y+(PosY-this._y)*spd2;
this._xscale = this._xscale+(OriSclae-this._xscale)*spd2;
this._yscale = this._yscale+(OriSclae-this._yscale)*spd2;
}
}
12. Go in to circle's MovieClip (double click on circle)
13. Add one more frame (F6)

14. On second frame, remove outline from circle and resize circle (it should be much smaller).


15. Now add new layer.

16. Separate frames by pressing F6.

17. Add actionscript on both frames:
stop();
18. Your layers now should look like this:

19. One thing that I forgot. Go back to root and enter in to Home button first.
20. Select Hit frame and press F6. You should get this:

21. Now, on Hit frame, draw square above text.

22. Go back to root and do the same with Contact button.
23. That's all folks. Test your Movie. (Ctrl + Enter)
24. Now you can change shape of circle, buttons and background.
25. Search our big tutorial database (right now we have 1846 tutorials) on www.tutorial4me.com. Go to home page.
|