Hola a todos!
bueno pues les cuento que soy un novaton en flash, estoy haciendo un mapa interactivo para que cuando le pases por ciertas partes el cursor salga el nombre de la ciudad y una pequeña foto, todo va bien hasta que metí el codigo del marker.
Este es el código
stop();
import fl.transitions.Tween;
import fl.transitions.easing.*;
var cities:Array = ["veracruz", "puebla", "morelos", "michoacan"]
function mover (targetX, targetY){
currentX: marker_mc._x;
currentY: marker_mc._y;
var xTween:Tween = new Tween(marker_mc, "_x",
Strong.easeOut, currentX, targetX, .5, true);
var yTween:Tween = new Tween(marker_mc, "_y",
Back.easeOut, currentY, targetY, 1.5, true);
}
for (var i = 0; i<cities.length; i++){
var my_btn = this[cities+"_btn"];
my_btn.myCity = cities;
my_btn.onRollOver = function() {
mover( this._x, this._y);
marker_mc.gotoAndStop(this.myCity);
}
my_btn.onRollOut = function() {
mover( 0, 0);
marker_mc.gotoAndStop(this.myCity);
}
}
y estos los errores que marca
Escena 1, Capa 'Actions', Fotograma 1, Línea 11 1120: Acceso a una propiedad currentX no definida.
Escena 1, Capa 'Actions', Fotograma 1, Línea 13 1120: Acceso a una propiedad currentY no definida.
Según tengo entendido es porque no encuentra las variables de x y pero yo le puse arriba que CurrentX: marker_mc, "_x"
No se si alguien me puede ayudar porfa
bueno pues les cuento que soy un novaton en flash, estoy haciendo un mapa interactivo para que cuando le pases por ciertas partes el cursor salga el nombre de la ciudad y una pequeña foto, todo va bien hasta que metí el codigo del marker.
Este es el código
stop();
import fl.transitions.Tween;
import fl.transitions.easing.*;
var cities:Array = ["veracruz", "puebla", "morelos", "michoacan"]
function mover (targetX, targetY){
currentX: marker_mc._x;
currentY: marker_mc._y;
var xTween:Tween = new Tween(marker_mc, "_x",
Strong.easeOut, currentX, targetX, .5, true);
var yTween:Tween = new Tween(marker_mc, "_y",
Back.easeOut, currentY, targetY, 1.5, true);
}
for (var i = 0; i<cities.length; i++){
var my_btn = this[cities+"_btn"];
my_btn.myCity = cities;
my_btn.onRollOver = function() {
mover( this._x, this._y);
marker_mc.gotoAndStop(this.myCity);
}
my_btn.onRollOut = function() {
mover( 0, 0);
marker_mc.gotoAndStop(this.myCity);
}
}
y estos los errores que marca
Escena 1, Capa 'Actions', Fotograma 1, Línea 11 1120: Acceso a una propiedad currentX no definida.
Escena 1, Capa 'Actions', Fotograma 1, Línea 13 1120: Acceso a una propiedad currentY no definida.
Según tengo entendido es porque no encuentra las variables de x y pero yo le puse arriba que CurrentX: marker_mc, "_x"
No se si alguien me puede ayudar porfa