Comunidad de diseño web y desarrollo en internet online

Necesito ayuda con este codigo

Citar            
MensajeEscrito el 25 Mar 2010 06:07 pm
Hola que tal espero que bien,
bueno les comento, he estado viendo el codigo de una calculadora de calculo maya (calcula el kin de la persona)
El codigo de la calculadora esta excelente y cumple su funcion perfectamente, pero a mi me gustaria agregarle ALGO MAS.
La calculadora al momento de dar el resultado te da el SELLO - TONO y tu kin, este ultimo es un numero.
Lo que mi me gustaria agregarle a este codigo es que cuando te de un el numero del kin te abra un pagina que diga que significa el numero o si fuera posible en un iframe.
por ejemplo:
kin 240 = www.google.cl
kin120= www.yahoo.cl

La aplicacion es la sgte:



Poseo el archivo fla, al que le interese ayudarme a terminar esta idea le envio el archivo :)

Por terexita86

5 de clabLevel



 

firefox
Citar            
MensajeEscrito el 25 Mar 2010 07:49 pm
Si es que sirve de algo les doy el codigo que me da el resultado.
Me gustaria agregar que si el resultado del kin es 1 se abriera un popup.
Porfavor ayudenme :)
Si necesitan el archivo fla se los envio :)

Código ActionScript :

function dateChange(component)
{
    var _loc1 = _root;
    aboutWin_mc._visible = false;
    t_about_mc.gotoAndStop(1);
    gMonth = _loc1.comboBox1.getSelectedItem().data;
    gDay = _loc1.comboBox2.getValue();
    gYear = _loc1.comboBox3.getValue();
    mYear = gYear;
    if (gMonth == 2 && gDay == 29)
    {
        gDay = 28;
    } // end if
    if (gMonth <= 7)
    {
        if (gDay <= 25)
        {
            mYear = gYear - 1;
        }
        else if (gDay > 25 && gMonth <= 6)
        {
            mYear = gYear - 1;
        } // end if
    } // end else if
    match = searchArray(transYearArray, mYear);
    mYearTS = transYearArray[match + 1] + " " + transYearArray[match + 2];
    if (gMonth == 1)
    {
        delta = gDay + 158;
    }
    else if (gMonth == 2)
    {
        delta = gDay + 189;
    }
    else if (gMonth == 3)
    {
        delta = gDay + 217;
    }
    else if (gMonth == 4)
    {
        if (gDay < 12)
        {
            delta = gDay + 248;
        }
        else
        {
            delta = gDay - 12;
        } // end else if
    }
    else if (gMonth == 5)
    {
        delta = gDay + 18;
    }
    else if (gMonth == 6)
    {
        delta = gDay + 49;
    }
    else if (gMonth == 7)
    {
        if (gDay < 26)
        {
            delta = gDay + 79;
        }
        else
        {
            delta = gDay - 26;
        } // end else if
    }
    else if (gMonth == 8)
    {
        delta = gDay + 5;
    }
    else if (gMonth == 9)
    {
        delta = gDay + 36;
    }
    else if (gMonth == 10)
    {
        delta = gDay + 66;
    }
    else if (gMonth == 11)
    {
        delta = gDay + 97;
    }
    else if (gMonth == 12)
    {
        delta = gDay + 127;
    } // end else if
    match = searchArray(tzolkinArray, mYearTS);
    kin = match + delta;
    if (kin > 260)
    {
        kin = kin - 260;
    } // end if
    finalTS = tzolkinArray[kin];
    if (finalTS.indexOf(" ") == 2)
    {
        tone = finalTS.slice(0, 2);
        seal = finalTS.slice(3, finalTS.length);
    }
    else
    {
        tone = finalTS.slice(0, 1);
        seal = finalTS.slice(2, finalTS.length);
    } // end else if
    toneName = toneNameArray[tone];
    if (seal == "Dragon" || seal == "Serpent" || seal == "Moon" || seal == "Skywalker" || seal == "Earth")
    {
        sealColor = "Red";
    }
    else if (seal == "Wind" || seal == "Worldbridger" || seal == "Dog" || seal == "Wizard" || seal == "Mirror")
    {
        sealColor = "White";
    }
    else if (seal == "Night" || seal == "Hand" || seal == "Monkey" || seal == "Eagle" || seal == "Storm")
    {
        sealColor = "Blue";
    }
    else
    {
        sealColor = "Yellow";
    } // end else if
    glyph = sealColor + " " + toneName + " " + seal;
    glyph_mc.tone_mc.gotoAndStop(tone);
    sealNumber = match = searchArray(sealNameArray, seal);
    glyph_mc.seal_mc.gotoAndStop(sealNumber);
} // End of the function
function searchArray(array, item)
{
    var _loc1 = item;
    thisArray = array;
    l = thisArray.length;
    for (match = 0; match < l; match++)
    {
        if (thisArray[match] == _loc1)
        {
            return (match);
        } // end if
    } // end of for
} // End of the function
currentDate = new Date();
currentDay = currentDate.getDate();
currentMonth = currentDate.getMonth();
currentYear = currentDate.getFullYear();
var tone;
var glyph;
var gYear;
var mYear;
var mYearTS;
var kin;
var delta;
var maxYear = 2013;
var minYear = 1850;
var yearArray = new Array();
y = maxYear;
j = 0;
for (i = minYear; i <= maxYear; i++)
{
    yearArray[j] = y;
    --y;
    ++j;
} // end of for
var toneArray = ["", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13"];
var toneNameArray = ["", "Magnetic", "Lunar", "Electric", "Self-Existing", "Overtone", "Rhythmic", "Resonant", "Galactic", "Solar", "Planetary", "Spectral", "Crystal", "Cosmic"];
var sealNameArray = ["", "Dragon", "Wind", "Night", "Seed", "Serpent", "Worldbridger", "Hand", "Star", "Moon", "Dog", "Monkey", "Human", "Skywalker", "Wizard", "Eagle", "Warrior", "Earth", "Mirror", "Storm", "Sun"];
var tzolkinArray = new Array();
tzolkinArray[0] = "";
t = 1;
g = 1;
trace ("/// 260 day - TZOLKIN ///");
for (k = 1; k <= 260; k++)
{
    tzolkinArray[k] = toneArray[t] + " " + sealNameArray[g];
    trace (tzolkinArray[k]);
    ++t;
    ++g;
    if (t > 13)
    {
        t = 1;
    } // end if
    if (g > 20)
    {
        g = 1;
    } // end if
} // end of for
var transYearArray = new Array();
t = 8;
g = 4;
y = maxYear;
i = 0;
while (y > 0)
{
    transYearArray[i] = y;
    ++i;
    transYearArray[i] = toneArray[t];
    ++i;
    transYearArray[i] = sealNameArray[g];
    ++i;
    t = t - 1;
    g = g - 5;
    y = y - 1;
    if (t < 1)
    {
        t = 13;
    } // end if
    if (g < 4)
    {
        g = 19;
    } // end if
} // end while
globalStyleFormat.arrow = 16777215;
globalStyleFormat.face = 39219;
globalStyleFormat.scrollTrack = 26163;
globalStyleFormat.background = 26112;
globalStyleFormat.highlight = 52275;
globalStyleFormat.highlight3D = 52224;
globalStyleFormat.shadow = 13056;
globalStyleFormat.textColor = 16777215;
globalStyleFormat.textFont = "Arial";
button1.setSize(70);
button1.setClickHandler("dateChange");
button1.setStyleProperty("textColor", 26112);
globalStyleFormat.applyChanges();
_root.comboBox1.setSize(90);
_root.comboBox1.setSelectedIndex(currentMonth);
_root.comboBox2.setSize(40);
_root.comboBox2.setSelectedIndex(currentDay - 1);
_root.comboBox3.setSize(55);
_root.comboBox3.setDataProvider(yearArray);
_root.comboBox3.setSelectedIndex(currentYear - 2013 - (currentYear - 2013) * 2);

Por terexita86

5 de clabLevel



 

firefox
Citar            
MensajeEscrito el 26 Mar 2010 06:51 am
O sea cómo?

Descompilaste ese código y quieres que te ayudemos a incluirle features a un archivo robado?

U_U Not good.

Por violetisha

575 de clabLevel

1 tutorial
1 articulo

Genero:Femenino  

Mi silla en el estudio, México

opera

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.