Comunidad de diseño web y desarrollo en internet online

¿Cómo le introduzco scroll a éste código?

Citar            
MensajeEscrito el 15 May 2008 03:08 pm
Muy buenas, he conseguido crear una sección de notícias igualita a la de www.sasokos.com (Latest News). Mi problema ahora es que no encuentro la manera que al desplegar una notícia (leída de un xml), me aparezca el scroll en caso de que el texto sobrepase el espacio permitido, os posteo el código y pedidme si necesitais algo más. Porque le he dado vueltas y no me sale de ninguna manera.

Código fotograma 1 del mc \"xmlx\"

Código :

function gumbs(plusOrMinus)
{
    _global.currentNews = currentNews + plusOrMinus;
    toolong = NewsStack1.length - 1;
    if (currentNews < 0)
    {
        _global.currentNews = 0;
    } // end if
    if (currentNews > toolong)
    {
        _global.currentNews = toolong;
    } // end if
    _parent.pagex.pagex.txtx.text = \"Current page: \" + [currentNews + 1] + \" of \" + [toolong + 1];
    loadpic1 = function ()
    {
        pic1.picx.loadMovie(_global.NewsStack1[_global.currentNews]);
    };
    loadpic2 = function ()
    {
        pic2.picx.loadMovie(_global.NewsStack2[_global.currentNews]);
    };
    title1.title1.txtx.text = _global.NewsStack3[_global.currentNews];
    title2.title1.txtx.text = _global.NewsStack4[_global.currentNews];
    date1.date1.txtx.text = _global.NewsStack5[_global.currentNews];
    date2.date1.txtx.text = _global.NewsStack6[_global.currentNews];
    text1.txtx.htmlText = _global.NewsStack7[_global.currentNews];
    text2.txtx.htmlText = _global.NewsStack8[_global.currentNews];
    if (_global.NewsStack9[_global.currentNews] == 0)
    {
        _parent.visitx1.bb._visible = true;
        var _loc3 = new mx.transitions.Tween(_parent.visitx1.showx, \"_alpha\", Normal.easeOut, _parent.visitx1.showx._alpha, 100, 2.000000E-001, true);
        _parent.visitx1.bb.onRelease = function ()
        {
            SWFAddress.setValue(_global.NewsStack11[_global.currentNews]);
        };
    }
    else if (_global.NewsStack9[_global.currentNews] == 1)
    {
        _parent.visitx1.bb._visible = true;
        _loc3 = new mx.transitions.Tween(_parent.visitx1.showx, \"_alpha\", Normal.easeOut, _parent.visitx1.showx._alpha, 100, 2.000000E-001, true);
        _parent.visitx1.bb.onRelease = function ()
        {
            getURL(_global.NewsStack11[_global.currentNews], \"_blank\");
        };
    }
    else
    {
        _parent.visitx1.bb._visible = false;
        _loc3 = new mx.transitions.Tween(_parent.visitx1.showx, \"_alpha\", Normal.easeOut, _parent.visitx1.showx._alpha, 50, 2.000000E-001, true);
    } // end else if
    if (_global.NewsStack10[_global.currentNews] == 0)
    {
        _parent.visitx2.bb._visible = true;
        _loc3 = new mx.transitions.Tween(_parent.visitx2.showx, \"_alpha\", Normal.easeOut, _parent.visitx2.showx._alpha, 100, 2.000000E-001, true);
        _parent.visitx2.bb.onRelease = function ()
        {
            SWFAddress.setValue(_global.NewsStack12[_global.currentNews]);
        };
    }
    else if (_global.NewsStack10[_global.currentNews] == 1)
    {
        _parent.visitx2.bb._visible = true;
        _loc3 = new mx.transitions.Tween(_parent.visitx2.showx, \"_alpha\", Normal.easeOut, _parent.visitx2.showx._alpha, 100, 2.000000E-001, true);
        _parent.visitx2.bb.onRelease = function ()
        {
            getURL(_global.NewsStack12[_global.currentNews], \"_blank\");
        };
    }
    else
    {
        _parent.visitx2.bb._visible = false;
        _loc3 = new mx.transitions.Tween(_parent.visitx2.showx, \"_alpha\", Normal.easeOut, _parent.visitx2.showx._alpha, 50, 2.000000E-001, true);
    } // end else if
    checkbuttons = function ()
    {
        if (currentNews > toolong - 1)
        {
            var _loc3 = new mx.transitions.Tween(_parent.nextx.nextx, \"_alpha\", Normal.easeOut, _parent.nextx.nextx._alpha, 50, 2.000000E-001, true);
            _parent.nextx.nx._visible = false;
        }
        else
        {
            _loc3 = new mx.transitions.Tween(_parent.nextx.nextx, \"_alpha\", Normal.easeOut, _parent.nextx.nextx._alpha, 100, 2.000000E-001, true);
            _parent.nextx.nx._visible = true;
        } // end else if
        if (currentNews < 1)
        {
            _loc3 = new mx.transitions.Tween(_parent.prevx.prevx, \"_alpha\", Normal.easeOut, _parent.prevx.prevx._alpha, 50, 2.000000E-001, true);
            _parent.prevx.px._visible = false;
        }
        else
        {
            _loc3 = new mx.transitions.Tween(_parent.prevx.prevx, \"_alpha\", Normal.easeOut, _parent.prevx.prevx._alpha, 100, 2.000000E-001, true);
            _parent.prevx.px._visible = true;
        } // end else if
        if (_global.NewsStack1[_global.currentNews] == undefined || _global.NewsStack1[_global.currentNews] == \"\")
        {
            pic1._visible = false;
            b1._visible = false;
            title1._visible = false;
            date1._visible = false;
            _loc3 = new mx.transitions.Tween(picbg1, \"_alpha\", Normal.easeOut, picbg1._alpha, 0, 2.000000E-001, true);
            _loc3 = new mx.transitions.Tween(d1, \"_alpha\", Normal.easeOut, d3._alpha, 0, 2.000000E-001, true);
            _loc3 = new mx.transitions.Tween(d2, \"_alpha\", Normal.easeOut, d4._alpha, 0, 2.000000E-001, true);
            _loc3.onMotionFinished = function ()
            {
                var _loc2 = new mx.transitions.Tween(_parent.bg1, \"_alpha\", Normal.easeOut, _parent.bg1._alpha, 25, 2.000000E-001, true);
            };
        }
        else
        {
            pic1._visible = true;
            b1._visible = true;
            title1._visible = true;
            date1._visible = true;
            _loc3 = new mx.transitions.Tween(_parent.bg1, \"_alpha\", Normal.easeOut, _parent.bg1._alpha, 100, 2.000000E-001, true);
            _loc3.onMotionFinished = function ()
            {
                var _loc1 = new mx.transitions.Tween(picbg1, \"_alpha\", Normal.easeOut, picbg1._alpha, 100, 2.000000E-001, true);
                _loc1 = new mx.transitions.Tween(d1, \"_alpha\", Normal.easeOut, d1._alpha, 100, 2.000000E-001, true);
                _loc1 = new mx.transitions.Tween(d2, \"_alpha\", Normal.easeOut, d2._alpha, 100, 2.000000E-001, true);
            };
        } // end else if
        if (_global.NewsStack2[_global.currentNews] == undefined || _global.NewsStack2[_global.currentNews] == \"\")
        {
            pic2._visible = false;
            b2._visible = false;
            title2._visible = false;
            date2._visible = false;
            _loc3 = new mx.transitions.Tween(picbg2, \"_alpha\", Normal.easeOut, picbg2._alpha, 0, 2.000000E-001, true);
            _loc3 = new mx.transitions.Tween(d3, \"_alpha\", Normal.easeOut, d3._alpha, 0, 2.000000E-001, true);
            _loc3 = new mx.transitions.Tween(d4, \"_alpha\", Normal.easeOut, d4._alpha, 0, 2.000000E-001, true);
            _loc3.onMotionFinished = function ()
            {
                var _loc2 = new mx.transitions.Tween(_parent.bg2, \"_alpha\", Normal.easeOut, _parent.bg2._alpha, 25, 2.000000E-001, true);
            };
        }
        else
        {
            pic2._visible = true;
            b2._visible = true;
            title2._visible = true;
            date2._visible = true;
            _loc3 = new mx.transitions.Tween(_parent.bg2, \"_alpha\", Normal.easeOut, _parent.bg2._alpha, 100, 2.000000E-001, true);
            _loc3.onMotionFinished = function ()
            {
                var _loc1 = new mx.transitions.Tween(picbg2, \"_alpha\", Normal.easeOut, picbg2._alpha, 100, 2.000000E-001, true);
                _loc1 = new mx.transitions.Tween(d3, \"_alpha\", Normal.easeOut, d3._alpha, 100, 2.000000E-001, true);
                _loc1 = new mx.transitions.Tween(d4, \"_alpha\", Normal.easeOut, d4._alpha, 100, 2.000000E-001, true);
            };
        } // end else if
    };
} // End of the function
stop ();
title1._alpha = 0;
title2._alpha = 0;
date1._alpha = 0;
date2._alpha = 0;
d1._alpha = 0;
d2._alpha = 0;
d3._alpha = 0;
d4._alpha = 0;
_parent.pagex.pagex._alpha = 0;
picbg1._alpha = 0;
picbg2._alpha = 0;
b1._visible = false;
b2._visible = false;
var news = new XML();
_global.currentNews = 0;
_global.NewsStack1 = new Array();
_global.NewsStack2 = new Array();
_global.NewsStack3 = new Array();
_global.NewsStack4 = new Array();
_global.NewsStack5 = new Array();
_global.NewsStack6 = new Array();
_global.NewsStack7 = new Array();
_global.NewsStack8 = new Array();
_global.NewsStack9 = new Array();
_global.NewsStack10 = new Array();
_global.NewsStack11 = new Array();
_global.NewsStack12 = new Array();
_global.currentNews = \"\";
_global.currentNews = 0;
_global.descStack = {};
news.ignoreWhite = true;
news.load(\"content/xml/latest-news-\" + _parent._parent.newsxmlframe + \".xml\");
news.onLoad = function (success)
{
    gotoAndPlay(\"in\");
    if (success)
    {
        for (var _loc4 = 0; _loc4 < news.firstChild.childNodes.length; ++_loc4)
        {
            _global.NewsStack1[_loc4] = this.firstChild.childNodes[_loc4].childNodes[0].childNodes[0].attributes.jpgTHUMB;
            _global.NewsStack2[_loc4] = this.firstChild.childNodes[_loc4].childNodes[1].childNodes[0].attributes.jpgTHUMB;
            _global.NewsStack3[_loc4] = this.firstChild.childNodes[_loc4].childNodes[0].childNodes[1].firstChild.nodeValue;
            _global.NewsStack4[_loc4] = this.firstChild.childNodes[_loc4].childNodes[1].childNodes[1].firstChild.nodeValue;
            _global.NewsStack5[_loc4] = this.firstChild.childNodes[_loc4].childNodes[0].childNodes[0].firstChild.nodeValue;
            _global.NewsStack6[_loc4] = this.firstChild.childNodes[_loc4].childNodes[1].childNodes[0].firstChild.nodeValue;
            _global.NewsStack7[_loc4] = this.firstChild.childNodes[_loc4].childNodes[0].childNodes[2].firstChild.nodeValue;
            _global.NewsStack8[_loc4] = this.firstChild.childNodes[_loc4].childNodes[1].childNodes[2].firstChild.nodeValue;
            _global.NewsStack9[_loc4] = this.firstChild.childNodes[_loc4].childNodes[0].childNodes[0].attributes.blankx;
            _global.NewsStack10[_loc4] = this.firstChild.childNodes[_loc4].childNodes[1].childNodes[0].attributes.blankx;
            _global.NewsStack11[_loc4] = this.firstChild.childNodes[_loc4].childNodes[0].childNodes[0].attributes.urlx;
            _global.NewsStack12[_loc4] = this.firstChild.childNodes[_loc4].childNodes[1].childNodes[0].attributes.urlx;
            _parent.nextx.nx.onRelease = function ()
            {
                _parent.nextx.nx._visible = false;
                _parent.prevx.px._visible = false;
                b1._visible = false;
                b2._visible = false;
                gotoAndPlay(\"out\");
                idx = 1;
            };
            _parent.prevx.px.onRelease = function ()
            {
                _parent.nextx.nx._visible = false;
                _parent.prevx.px._visible = false;
                b1._visible = false;
                b2._visible = false;
                gotoAndPlay(\"out\");
                idx = -1;
            };
            gumbs(-1);
        } // end of for
    } // end if
};
b1.onRelease = function ()
{
    b1._visible = false;
    opennews1();
    closenews2();
    b2._visible = true;
};
b2.onRelease = function ()
{
    b2._visible = false;
    opennews2();
    closenews1();
    b1._visible = true;
};
opennews1 = function ()
{
    var _loc1 = new mx.transitions.Tween(pic1.overx, \"_alpha\", Normal.easeOut, pic1.overx._alpha, 0, 2.000000E-001, true);
    _loc1 = new mx.transitions.Tween(picbg1, \"_height\", mx.transitions.easing.Strong.easeInOut, picbg1._height, 94, 4.000000E-001, true);
    _loc1 = new mx.transitions.Tween(pic1.mm, \"_height\", mx.transitions.easing.Strong.easeInOut, pic1.mm._height, 90, 4.000000E-001, true);
    _loc1 = new mx.transitions.Tween(pic1.picx, \"_y\", mx.transitions.easing.Strong.easeInOut, pic1.picx._y, -80, 4.000000E-001, true);
    _loc1 = new mx.transitions.Tween(d1, \"_y\", mx.transitions.easing.Strong.easeInOut, d1._y, 87, 4.000000E-001, true);
    _loc1 = new mx.transitions.Tween(date1, \"_y\", mx.transitions.easing.Strong.easeInOut, date1._y, 101, 4.000000E-001, true);
    _loc1 = new mx.transitions.Tween(title1, \"_y\", mx.transitions.easing.Strong.easeInOut, title1._y, 106, 4.000000E-001, true);
    _loc1 = new mx.transitions.Tween(text1, \"_y\", mx.transitions.easing.Strong.easeInOut, text1._y, 129, 5.000000E-001, true);
};
closenews1 = function ()
{
    var _loc1 = new mx.transitions.Tween(pic1.overx, \"_alpha\", Normal.easeOut, pic1.overx._alpha, 100, 2.000000E-001, true);
    _loc1 = new mx.transitions.Tween(picbg1, \"_height\", mx.transitions.easing.Strong.easeInOut, picbg1._height, 260, 4.000000E-001, true);
    _loc1 = new mx.transitions.Tween(pic1.mm, \"_height\", mx.transitions.easing.Strong.easeInOut, pic1.mm._height, 256, 4.000000E-001, true);
    _loc1 = new mx.transitions.Tween(pic1.picx, \"_y\", mx.transitions.easing.Strong.easeInOut, pic1.picx._y, 0, 4.000000E-001, true);
    _loc1 = new mx.transitions.Tween(d1, \"_y\", mx.transitions.easing.Strong.easeInOut, d1._y, 253, 4.000000E-001, true);
    _loc1 = new mx.transitions.Tween(date1, \"_y\", mx.transitions.easing.Strong.easeInOut, date1._y, 267, 4.000000E-001, true);
    _loc1 = new mx.transitions.Tween(title1, \"_y\", mx.transitions.easing.Strong.easeInOut, title1._y, 272, 4.000000E-001, true);
    _loc1 = new mx.transitions.Tween(text1, \"_y\", mx.transitions.easing.Strong.easeInOut, text1._y, 309, 4.000000E-001, true);
};
opennews2 = function ()
{
    var _loc1 = new mx.transitions.Tween(pic2.overx, \"_alpha\", Normal.easeOut, pic2.overx._alpha, 0, 2.000000E-001, true);
    _loc1 = new mx.transitions.Tween(picbg2, \"_height\", mx.transitions.easing.Strong.easeInOut, picbg2._height, 94, 4.000000E-001, true);
    _loc1 = new mx.transitions.Tween(pic2.mm, \"_height\", mx.transitions.easing.Strong.easeInOut, pic2.mm._height, 90, 4.000000E-001, true);
    _loc1 = new mx.transitions.Tween(pic2.picx, \"_y\", mx.transitions.easing.Strong.easeInOut, pic2.picx._y, -80, 4.000000E-001, true);
    _loc1 = new mx.transitions.Tween(d3, \"_y\", mx.transitions.easing.Strong.easeInOut, d3._y, 87, 4.000000E-001, true);
    _loc1 = new mx.transitions.Tween(date2, \"_y\", mx.transitions.easing.Strong.easeInOut, date2._y, 101, 4.000000E-001, true);
    _loc1 = new mx.transitions.Tween(title2, \"_y\", mx.transitions.easing.Strong.easeInOut, title2._y, 106, 4.000000E-001, true);
    _loc1 = new mx.transitions.Tween(text2, \"_y\", mx.transitions.easing.Strong.easeInOut, text2._y, 129, 5.000000E-001, true);
};
closenews2 = function ()
{
    var _loc1 = new mx.transitions.Tween(pic2.overx, \"_alpha\", Normal.easeOut, pic2.overx._alpha, 100, 2.000000E-001, true);
    _loc1 = new mx.transitions.Tween(picbg2, \"_height\", mx.transitions.easing.Strong.easeInOut, picbg2._height, 260, 4.000000E-001, true);
    _loc1 = new mx.transitions.Tween(pic2.mm, \"_height\", mx.transitions.easing.Strong.easeInOut, pic2.mm._height, 256, 4.000000E-001, true);
    _loc1 = new mx.transitions.Tween(pic2.picx, \"_y\", mx.transitions.easing.Strong.easeInOut, pic2.picx._y, 0, 4.000000E-001, true);
    _loc1 = new mx.transitions.Tween(d3, \"_y\", mx.transitions.easing.Strong.easeInOut, d3._y, 253, 4.000000E-001, true);
    _loc1 = new mx.transitions.Tween(date2, \"_y\", mx.transitions.easing.Strong.easeInOut, date2._y, 267, 4.000000E-001, true);
    _loc1 = new mx.transitions.Tween(title2, \"_y\", mx.transitions.easing.Strong.easeInOut, title2._y, 272, 4.000000E-001, true);
    _loc1 = new mx.transitions.Tween(text2, \"_y\", mx.transitions.easing.Strong.easeInOut, text2._y, 305, 4.000000E-001, true);
};
text1.setMask(mm1);
text2.setMask(mm2);


Fotograma 2

Código :

var xTweenx = new mx.transitions.Tween(_parent.pagex.pagex, \"_alpha\", Normal.easeOut, 0, 100, 2.000000E-001, true);
checkbuttons();
_parent.nextx.nx._visible = false;
_parent.prevx.px._visible = false;
b1._visible = false;
b2._visible = false;


Fotograma 7

Código :

loadpic1();
var xTweenx = new mx.transitions.Tween(title1, \"_alpha\", Normal.easeOut, 0, 100, 2.000000E-001, true);
var xTweenx = new mx.transitions.Tween(date1, \"_alpha\", Normal.easeOut, 0, 100, 2.000000E-001, true);


Fotograma 10

Código :

loadpic2();
var xTweenx = new mx.transitions.Tween(title2, \"_alpha\", Normal.easeOut, 0, 100, 2.000000E-001, true);
var xTweenx = new mx.transitions.Tween(date2, \"_alpha\", Normal.easeOut, 0, 100, 2.000000E-001, true);


Fotograma 19

Código :

stop ();
checkbuttons();


Fotograma 20

Código :

var xTweenx = new mx.transitions.Tween(_parent.pagex.pagex, \"_alpha\", Normal.easeOut, 100, 0, 2.000000E-001, true);
b1._visible = false;
b2._visible = false;
closenews1();
closenews2();


Fotograma 30

Código :

pic1.gotoAndPlay(\"out\");
var xTweenx = new mx.transitions.Tween(title1, \"_alpha\", Normal.easeOut, 100, 0, 2.000000E-001, true);
var xTweenx = new mx.transitions.Tween(date1, \"_alpha\", Normal.easeOut, 100, 0, 2.000000E-001, true);


Fotograma 33

Código :

pic2.gotoAndPlay(\"out\");
var xTweenx = new mx.transitions.Tween(title2, \"_alpha\", Normal.easeOut, 100, 0, 2.000000E-001, true);
var xTweenx = new mx.transitions.Tween(date2, \"_alpha\", Normal.easeOut, 100, 0, 2.000000E-001, true);


Fotograma 40

Código :

stop ();
gumbs(idx);
gotoAndPlay(\"in\");


Con un fade in en el fotograma 2 y una fade out en el 20.
Lo siento por el tostón!

Por xvs

5 de clabLevel



 

firefox
Citar            
MensajeEscrito el 15 May 2008 06:36 pm
lo descompilaste?

Por DiegoAzul

376 de clabLevel



 

Mx

firefox
Citar            
MensajeEscrito el 15 May 2008 06:38 pm
:swat: ja si lo descompilaste! que mal ,que mal!

Por DiegoAzul

376 de clabLevel



 

Mx

firefox
Citar            
MensajeEscrito el 15 May 2008 06:47 pm
que? descompilar el que?

Por xvs

5 de clabLevel



 

firefox
Citar            
MensajeEscrito el 15 May 2008 06:51 pm
que usaste un descompilador, osea que fuiste a esa pagina www.sasokos.com bajaste el swf y con sothink descopiler lo descompilaste. jajaja

Por DiegoAzul

376 de clabLevel



 

Mx

firefox
Citar            
MensajeEscrito el 15 May 2008 06:52 pm
y como coño se hace eso, alhomejor serà porque sabes muxo del tema

Por xvs

5 de clabLevel



 

firefox
Citar            
MensajeEscrito el 15 May 2008 06:57 pm
si yo sé descompilar , y estoy seguro que usaste sothink descompiler, el porque lo sé?, es por el nombre de las variables que sothink usa, asi que tu no hiciste el codigo, lo bajaste y lo descompilaste y pegaste el codigo para que acabaramos el trabajo, y creias que no nos ibamos a dar cuenta jajaja.

Por DiegoAzul

376 de clabLevel



 

Mx

firefox
Citar            
MensajeEscrito el 15 May 2008 07:02 pm
Si tu me vas a acabar el trabajo, no te metas con la gente sin saber nada, lo único que me ha kedado claro és que tu lo usas y sabes del tema, así que vete a bajar alguna web que veo que tienes tiempo libre para meterte con la gente, cuando tu admites que haces lo mismo que la gente que acusas.

Por xvs

5 de clabLevel



 

firefox
Citar            
MensajeEscrito el 15 May 2008 07:40 pm
a mi me gusta capturar a la gente que descompila y viene apostear xvs, no es nada personal solo digo lo que es, lo descompilaste , y te lo dice un experto en descompilar y tu lo hiciste . jajaja

Por DiegoAzul

376 de clabLevel



 

Mx

firefox

 

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