Hi,
i use this code on 1. frame to create menu.
items = ["button 1","button 2","button 3","button 4","button 5","button 6","button 7"]
function chpok(){
s = new Sound();
s.attachSound("z");
s.start();
}
MovieClip.prototype.asBut = function(){
this.btn._alpha = 50;
// crate text
this.txt = items[this.i];
this.onRollOver = function(){
chpok();
this.t=true;
// disabled this.txt = items[this.i];
new Color(this.flake).setRGB(0x000000);
}
this.onRollOut = function(){
this.t = false;
// disabled this.txt = "";
new Color(this.flake).setRGB(0xFFFFFF);
}
this.onRelease = this.onReleaseOutside = function(){
trace("this.button "+this.num+" is CALLED");
}
this.onEnterFrame = function(){
// i dont understand this :(
this.btn._alpha += (10*this.t*(this.btn._alpha<100)-4*!(this.t)*(this.btn._alpha>5));
}
}
i=0;
function makeMenu(){
_root.attachMovie("mc","mc"+i,i);
_root["mc"+i].i = i;
_root["mc"+i].num = i+1;
_root["mc"+i]._x = 60;
_root["mc"+i]._y = 50 + 30*i;
_root["mc"+i].asBut();
i++;
if(i>6)clearInterval(id);
}
id = setInterval(makeMenu,150)
Please how can i create a function use events?
mc1.onPress = function (){
// call swf
}
thank you