Tengo el siguiente script y en el arreglo de la tabla 1, al querer ir a matenimiento.html dice objeto no encontrado y en lugar del link aparece undefined
stop();
import mx.transitions.Tween;
import mx.transitions.easing.*;
System.security.allowDomain("*");
/**************/
var tab_array:Object = new Object()
tab_array["tab1"] = {content:"tab1_content", url:"mantenimiento.html"}
tab_array["tab2"] = {content:"tab2_content", url:"proyectos.html"}
tab_array["tab3"] = {content:"tab3_content", url:"areasdisponibles.html"}
tab_array["tab4"] = {content:"tab4_content", url:"http://cosseccim.org/"}
var auto_array = new Array("tab1", "tab2", "tab3", "tab4");
var currentPorp = new Object();
prev = {tab:'', content:'', active:''}
var defaultTab = "tab1";
function setAction() {
for(var i in tab_array) {
var currentTab = i;
var current_mc = this[currentTab];
current_mc.onRollOver = setRollover;
current_mc.onRollOut = setRollOut;
current_mc.onRelease = setRelease;
//set url action
var target_mc = this[tab_array[currentTab].content];
target_mc._alpha = 0;
target_mc.onRelease = gotoURL;
if(i==defaultTab) {
showTab(defaultTab);
}
}
}
//run this code
setAction();
function setRollover(evt) {
var current_mc = this;
current_mc.gotoAndStop(2);
}
function setRollOut(evt) {
var current_mc = this;
if(prev.active != current_mc._name)
current_mc.gotoAndStop(1);
}
function setRelease(evt) {
var current_mc = this;
current_mc.gotoAndStop(2);
//prev.active = current_mc._name;
var url = tab_array[current_mc._name].url;
var target_mc = tab_array[current_mc._name].content;
var current_tab = current_mc._name;
currentPorp.url = url;
currentPorp.tab = current_tab;
currentPorp.target_mc = target_mc;
showTab(current_mc._name);
setCounter();
stopAutoScroll();
}
function setCounter() {
for(var i:Number=0;i<auto_array.length;i++) {
if(currentPorp.tab==auto_array[i]) {
counter = (i+1);
return;
}
}
}
function showTab(tab) {
var current_mc = this[tab];
//trace("prev.active " +prev.active + " tab " + tab);
if(prev.active!="") {
this[prev.active].gotoAndStop(1);
}
prev.active = tab;
//trace(" showTab prev.active " +prev.active + " tab " + tab);
current_mc.gotoAndStop(2);
var target_mc = this[tab_array[tab].content];
if(prev.content!="") {
new Tween(prev.content, "_alpha", easeIn.easeIn, 100, 0, 1, true);
}
prev.content = target_mc;
var bTween:Tween = new Tween(target_mc, "_alpha", easeIn.easeIn, 0, 100, 1, true);
bTween.onMotionFinished = function(evt) {
//trace("done");
}
}
function gotoURL() {
var current_mc = this;
trace("currentPorp.url " + currentPorp.url);
getURL(currentPorp.url);
}
/**********************/
var auto;
var counter = 1;
function autoScroll() {
if(counter>=auto_array.length) {
counter =0;
}
var tab = auto_array[counter];
showTab(tab);
counter++;
}
function stopAutoScroll() {
clearInterval(auto);
auto = setInterval(autoScroll, 6000);
}
function startScroll() {
clearInterval(auto);
auto = setInterval(autoScroll, 6000);
}
startScroll();
/***************************/
Aquí pueden verlo: http://activesystem.com.mx/comeci
Gracias de antemano.