Por: penHolder + 06.11.2007


Código :
this.createEmptyMovieClip("botonera",this.getNextHighestDepth());Código :
var labels:Array = Array("home","about","services","contact");Código :
with(botonera){
}Código :
with(botonera){
this._x = 50;
}
Código :
with(botonera){
this._x = 50;
for(i=1;i <= labels.length; i++){
}
}
Código :
with(botonera){
this._x = 50;
for(i=1;i <= labels.length; i++){
var modelButton:MovieClip = this.attachMovie("boton", "boton"+i , this.getNextHighestDepth ());
}
}
Código :
with(botonera){
this._x = 50;
for(i=1;i <= labels.length; i++){
var modelButton:MovieClip = this.attachMovie("boton", "boton"+i , this.getNextHighestDepth ());
modelButton._x = 0;
modelButton._y = ((i*0)+this._height) +5; //multiplicamos por 0, para q la distancia sea constante
}
}
Código :
with(botonera){
this._x = 50;
for(i=1;i <= labels.length; i++){
var modelButton:MovieClip = this.attachMovie("boton", "boton"+i , this.getNextHighestDepth ());
modelButton._x = 0;
modelButton._y = ((i*0)+this._height) +5; //multiplicamos por 0, para q la distancia sea constante
modelButton.t.text = labels[i-1];
}
}
Código :
with(botonera){
this._x = 50;
for(i=1;i <= labels.length; i++){
var modelButton:MovieClip = this.attachMovie("boton", "boton"+i , this.getNextHighestDepth ());
modelButton._x = 0;
modelButton._y = ((i*0)+this._height) +5; //multiplicamos por 0, para q la distancia sea constante
modelButton.t.text = labels[i-1];
modelButton.onEnterFrame = function (){
//ecuacion para la trancicion de alpha
//donde: a = transparencia
// v = velocidad de trancicion
this._alpha += (this.a - this._alpha) /this.v;
//si el cursor esta sobre el boton...
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
//...cambia su transparencia al 50%
this.a = 50;
this.v = 5;
//sino, vuelve o se mantiene al 100%
} else{
this.a = 100;
this.v = 10;
}
}
}
}
}
Código :
modelButton.onMouseDown = function (){
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if(this._name == "boton1"){
trace("welcome home")//acciones
}
if(this._name == "boton2"){
trace("about us")//acciones
}
if(this._name == "boton3"){
trace("our services")//acciones
}
if(this._name == "boton4"){
trace("contact us")//acciones
}
}
}
Código :
modelButton._y = ((i*0)+this._height) +5; //multiplicamos por 0, para q la distancia sea constanteconstante??? es decir siempre cero???
Código :
modelButton._y = this._height+5;
Código :
modelButton._y = (this._height*i) (5 * i);
Código :
boton.onRollOver = function(){
this.gotoAndPlay('INN');
}Código :
modelButton._y = (this._height*i) (5 * i);
Código :
modelButton._y = (this._height*i) "MAS" (5 * i);
Código :
modelButton._y = (modelButton._height + 5)*i;
Código :
modelButton._y = ((modelButton._height + 5)*i) - modelButton._height;
sarj :
Código :
modelButton.onMouseDown = function (){
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if(this._name == "boton1"){
trace("welcome home")//acciones
}
if(this._name == "boton2"){
trace("about us")//acciones
}
if(this._name == "boton3"){
trace("our services")//acciones
}
if(this._name == "boton4"){
trace("contact us")//acciones
}
}
}