jaja...
en realidad esperaba comentarios, links a posts anteriores, tutoriales o si hay alguien que se ofrezca a hacerlo... jaja
1ra. Pregunta:
Tengo una lista de ciudades y un mapa con divisiones de ciudades. Al pasar el mouse, ya sea en la lista o el mapa, deberia reaccionar ambos, es decir... si paso por "nombre 5" cambia de color y tambien deberia cambiar de color el "area 5" del mapa.
los areas del mapa, estan dentro del MC-MAPA, se amplia al hacerle click y se mostraran algunas ciudades importantes.
La lista de nombres lo tengo en la raiz y si hago click en "nombre 5" deberia ampliarse el "area 5"
Código ActionScript :
var clipPosX = 460;
var clipPosY = 250;
var ws = Stage.width;
var hs = Stage.height;
var myPosX:Number;
var myPosY:Number;
var beginWidth:Number;
var zoomOut = true;
var Cities:Object = {
tumbes:{zoom:19, align:"left"},
piura:{zoom:7.6, align:"left"},
lambayeque:{zoom:10, align:"left"},
lalibertad:{zoom:7, align:"left"},
cajamarca:{zoom:5, align:"left"},
};
function zoom(){
zoomOut = false;
r=Cities[ this._name ];
myPosX = r.zoom*-(this._x);
myPosY = r.zoom*-(this._y);
_root.mapa.targetWidth = ws*r.zoom;
_root.mapa.targetHeight = hs*r.zoom;
_root.mapa.targetXpos = clipPosX+myPosX;
_root.mapa.targetYpos = clipPosY+myPosY;
this.swapDepths(1);
}
mapa.onEnterFrame = function() {
var speed =10;
this._width += (this.targetWidth-this._width)/speed;
this._height += (this.targetHeight-this._height)/speed*1.1;
this._x += ((this.targetXpos)-this._x+100)/speed;
this._y += ((this.targetYpos)-this._y)/speed;
};
//Set Cities Events
for ( var City in Cities){
var Clip = mapa[City];
Clip.onPress = zoom;
Clip.onRollOver = gotoOver;
Clip.onRollOut= gotoOut;
}
//--- buttons
function gotoOver(){
this.gotoAndStop("over")}
function gotoOut(){
this.gotoAndStop("out")}
por ahora tengo eso... aqui ya se define la accion al hacerle click en el area... ¿como hago para que el boton o MC "nombre" que esta en la raiz tenga la accion correspondiente a su respectiva area?
gracias!