Visualizzazione dei risultati da 1 a 6 su 6

Discussione: Dimensione immagine

  1. #1

    Dimensione immagine

    Salve a tutti. é da un po' che sto cercando di modificare un file in flash ma sono abbastanza impedito con il codice flash. La cosa è semplice, vorrei che l'immagine principale dello script sottostante venga visualizzata con una tale grandezza e non della grandezza dell'immagine perchè così va fuori dai bordi come da immagine.



    Qualcuno potrebbe aiutarmi a fare in modo che la seguente variabile: gtns si veda di una grandezza di 200x300? Grazie mille

    codice:
    _global.root = this;
    var aGtns = new Array();
    var aGphs = new Array();
    var aLinks = new Array();
    var aDesc = new Array();
    var aHead = new Array();
    var aTxt = new Array();
    var aLinksUpcoming = new Array();
    var aTxtUpcoming = new Array();
    var aXPos = new Array();
    var bFirstRun = true;
    var bRotate;
    var mcGtns;
    var mcTxtGph;
    var mcBorders;
    var mcCenter;
    var mcCenterBorder;
    var mcLeft;
    var mcRight;
    var nGphX;
    var nGphY;
    var nDockX;
    var nDockY;
    var nSpeed;
    var nLength;
    var nLengthUpComing;
    var nCounter;
    var nBorderColor;
    var nCenterColor;
    var nMin;
    var nMid;
    var nMax;
    var nSpacer;
    var nOffset;
    var nCenter;
    var nActualCtr;
    var nTop;
    var nRight;
    var nBottom;
    var nLeft;
    var nXPos;
    var nYPos;
    var nTimer;
    var sColGraphic;
    var sColLink;
    var sUpcomingChrome;
    var sUpcomingViewAll;
    function initDock()
    {
        nGphX = 0;
        nGphY = 0;
        nDockX = 409;
        nDockY = 335;
        nSpeed = 5.000000E-001;
        root.attachMovie("target", "mcGph", root.getNextHighestDepth());
        maskGradient();
        root.createEmptyMovieClip("mcDock", root.getNextHighestDepth());
        mcGph._x = nGphX;
        mcGph._y = nGphY;
        loadXML();
    } // End of the function
    function maskGradient()
    {
        root.attachMovie("gradient", "mcGradient", root.getNextHighestDepth());
        mcGradient._x = 40;
        mcGradient._y = 293;
        root.attachMovie("mask","mcMaskGradient",root.getNextHighestDepth());
        mcGradient.setMask(mcMaskGradient);
        mcMaskGradient._x = mcGradient._x - 5;
        mcMaskGradient._y = mcGradient._y + mcGradient._height;
        mcMaskGradient._width = mcGradient._width + 10;
        mcMaskGradient._height = mcGradient._height;
    } // End of the function
    function loadXML()
    {
        function initGames()
        {
            games = XO.toObject(xmlGames.firstChild);
            oGames.unwatch("isLoaded");
            bRotate = games.settings.rotate;
            nTimer = games.settings.timer;
            sColGraphic = games.cg.img;
            sColLink = games.cg.link;
            nLength = games.game.length;
            trace (nLength);
            for (var _loc1 = 0; _loc1 < nLength; ++_loc1)
            {
                aGtns[_loc1] = games.game[_loc1].gtns;
                aGphs[_loc1] = games.game[_loc1].gph;
                aLinks[_loc1] = games.game[_loc1].link;
                aDesc[_loc1] = games.game[_loc1].desc;
                aHead[_loc1] = games.game[_loc1].head;
                aTxt[_loc1] = games.game[_loc1].value;
                mcDock.attachMovie("gtn", "mcGtn" + _loc1, mcDock.getNextHighestDepth());
                mcGtns = mcDock["mcGtn" + _loc1];
                mcGtns.enabled = false;
                loadGtns(mcGtns,aGtns[_loc1]);
                mcGtns.attachMovie("border","mcBorder"+_loc1,mcGtns.getNextHighestDepth());
                mcBorders = mcGtns["mcBorder" + _loc1];
            } // end of for
            sUpcomingChrome = games.settings.upcomingChrome;
            sUpcomingViewAll = games.settings.upcomingViewAll;
            sUpcomingGamesLink = games.settings.upcomingGamesLink;
            nLengthUpcoming = games.upcoming.length;
            for (var _loc2 = 0; _loc2 < nLengthUpcoming; ++_loc2)
            {
                aLinksUpcoming[_loc2] = games.upcoming[_loc2].link;
                aTxtUpcoming[_loc2] = games.upcoming[_loc2].value;
            } // end of for
        } // End of the function
        if (xmlHref)
        {
            var _loc3 = xmlHref;
        }
        else
        {
            _loc3 = "http://www.mangastory.helloweb.eu/duro.xml";
        } // end else if
        var oGames = new Object();
        var xmlGames = XO.LoadFile(_loc3, oGames);
        oGames.watch("isLoaded", initGames);
    } // End of the function
    function smoothGtns(mc)
    {
        var _loc2 = new flash.display.BitmapData(mc._width, mc._height, true);
        mc.attachBitmap(_loc2, mc.getNextHighestDepth(), "auto", true);
        _loc2.draw(mc);
    } // End of the function
    function colorTransform(mc, nColor)
    {
        var _loc1 = new flash.geom.ColorTransform();
        var _loc2 = new flash.geom.Transform(mc);
        _loc1.rgb = nColor;
        _loc2.colorTransform = _loc1;
    } // End of the function
    function colorBorders()
    {
        nBorderColor = 14408667;
        nCenterColor = 16777215;
        for (var _loc1 = 0; _loc1 < nLength; ++_loc1)
        {
            mcGtns = mcDock["mcGtn" + _loc1];
            mcBorders = mcGtns["mcBorder" + _loc1];
            colorTransform(mcBorders, nBorderColor);
        } // end of for
        mcCenterBorder = mcCenter["mcBorder" + nCenter];
        colorTransform(mcCenterBorder, nCenterColor);
    } // End of the function
    function enableGtns()
    {
        for (var _loc1 = 0; _loc1 < nLength; ++_loc1)
        {
            mcGtns = mcDock["mcGtn" + _loc1];
            mcGtns.enabled = true;
        } // end of for
    } // End of the function
    function loadGtns(mc, sUrl)
    {
        nCounter = 0;
        mcTarget = mc.mcTarget;
        var _loc1 = new MovieClipLoader();
        var _loc2 = new Object();
        _loc2.onLoadInit = function (mcTarget)
        {
            smoothGtns(mcTarget);
            mcTarget.cacheAsBitmap = true;
            ++nCounter;
            if (nCounter == nLength)
            {
                initGtns();
            } // end if
        };
        _loc1.addListener(_loc2);
        _loc1.loadClip(sUrl, mcTarget);
    } // End of the function
    function createHit()
    {
        root.createEmptyMovieClip("mcHit", root.getNextHighestDepth());
        mcHit.beginFill(65535, 0);
        mcHit.moveTo(40, 15);
        mcHit.lineTo(495, 15);
        mcHit.lineTo(495, 288);
        mcHit.lineTo(325, 288);
        mcHit.lineTo(325, 344);
        mcHit.lineTo(40, 344);
        mcHit.endFill();
    } // End of the function
    function clickHit()
    {
        mcHit.onRelease = function ()
        {
            clearInterval(autoRotateID);
            bRotate = false;
            getURL("javascript:location.href=\'" + aLinks[nCenter] + "\'; javascript:dcsMultiTrack(\'DCS.dcsuri\', \'" + aLinks[nCenter] + "\', \'WT.ti\', \'" + aDesc[nCenter] + "\', \'WT.dl\', \'6\');", "_self");
        };
    } // End of the function
    function createColGraphic()
    {
        root.createEmptyMovieClip("mcColGraphic", root.getNextHighestDepth());
        mcColGraphic._x = 505;
        mcColGraphic._y = 230;
        mcColGraphic._alpha = 0;
        loadColGraphic(mcColGraphic,sColGraphic);
    } // End of the function
    function loadColGraphic(mc, sUrl)
    {
        mcTarget = mc;
        var tAlpha;
        var _loc1 = new MovieClipLoader();
        var _loc2 = new Object();
        _loc2.onLoadInit = function (mcTarget)
        {
            tAlpha = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, nSpeed, true);
            createUpcomingSection();
            mc.cacheAsBitmap = true;
            mc.onRelease = function ()
            {
                getURL("javascript:location.href=\'" + sColLink + "\'; javascript:dcsMultiTrack(\'DCS.dcsuri\', \'" + sColLink + "\', \'WT.ti\', \'Games: Column Graphic: " + sColLink + "\', \'WT.dl\', \'6\');", "_self");
            };
        };
        _loc1.addListener(_loc2);
        _loc1.loadClip(sUrl, mcTarget);
    } // End of the function
    function createTxt()
    {
        root.createEmptyMovieClip("mcTxt", root.getNextHighestDepth());
        mcTxt._x = nGphX + 47;
        mcTxt._y = 299;
        mcTxt.createTextField("txtGphHead", 1, 0, 0, 275, 40);
        mcTxt.createTextField("txtGph", 2, 0, 23, 275, 40);
        mcTxtGphHead = mcTxt.txtGphHead;
        mcTxtGph = mcTxt.txtGph;
        root.attachMovie("mask", "mcMaskTxt", root.getNextHighestDepth());
        mcTxt.setMask(mcMaskTxt);
        mcMaskTxt._x = 40;
        mcMaskTxt._y = nDockY + 5;
        mcMaskTxt._width = 285;
        mcMaskTxt._height = 55;
        var _loc2 = new TextFormat();
        _loc2.color = 16777215;
        _loc2.font = "Verdana";
        _loc2.size = 11;
        var _loc1 = new TextFormat();
        _loc1.color = 16777215;
        _loc1.font = "Verdana";
        _loc1.size = 19;
        mcTxtGphHead.html = true;
        mcTxtGph.html = true;
        mcTxtGphHead.htmlText = EscChar.getEscChar(aHead[nCenter]);
        mcTxtGph.htmlText = EscChar.getEscChar(aTxt[nCenter]);
        mcTxtGphHead.selectable = false;
        mcTxtGph.selectable = false;
        mcTxtGphHead.setTextFormat(_loc1);
        mcTxtGph.setTextFormat(_loc2);
    } // End of the function
    function loadTxt(sTxt)
    {
        var _loc3 = new mx.transitions.Tween(mcMaskTxt, "_y", mx.transitions.easing.Strong.easeOut, mcMaskTxt._y, nDockY + 5, nSpeed, true);
        _loc3.onMotionFinished = function ()
        {
            var _loc2 = new TextFormat();
            _loc2.color = 16777215;
            _loc2.font = "Verdana";
            _loc2.size = 11;
            var _loc1 = new TextFormat();
            _loc1.color = 16777215;
            _loc1.font = "Verdana";
            _loc1.size = 19;
            mcTxtGphHead.html = true;
            mcTxtGph.html = true;
            mcTxtGphHead.htmlText = EscChar.getEscChar(aHead[nCenter]);
            mcTxtGph.htmlText = EscChar.getEscChar(sTxt);
            mcTxtGphHead.selectable = false;
            mcTxtGph.selectable = false;
            mcTxtGphHead.setTextFormat(_loc1);
            mcTxtGph.setTextFormat(_loc2);
        };
    } // End of the function
    function createUpcomingSection()
    {
        root.createEmptyMovieClip("mcUpcoming", root.getNextHighestDepth());
        mcUpcoming._x = 504;
        mcUpcoming._y = 20;
        mcUpcoming.createEmptyMovieClip("mcUpcomingChrome", 0);
        mcUpcomingChrome = mcUpcoming.mcUpcomingChrome;
        mcUpcomingChrome._x = 0;
        mcUpcomingChrome._y = 0;
        mcUpcomingChrome.createTextField("txtUpcomingChrome", 0, 0, 0, 280, 20);
        txtUpcomingChrome = mcUpcoming.mcUpcomingChrome.txtUpcomingChrome;
        var _loc1 = new TextFormat();
        _loc1.bold = true;
        _loc1.color = 6710886;
        _loc1.font = "Verdana";
        _loc1.size = 11;
        txtUpcomingChrome.html = true;
        txtUpcomingChrome.htmlText = EscChar.getEscChar(sUpcomingChrome);
        txtUpcomingChrome.selectable = false;
        txtUpcomingChrome.setTextFormat(_loc1);
        mcUpcomingChrome.onRelease = function ()
        {
            getURL("javascript:location.href=\'" + sUpcomingGamesLink + "\'; javascript:dcsMultiTrack(\'DCS.dcsuri\', \'" + sUpcomingGamesLink + "\', \'WT.ti\', \'Games: " + sUpcomingChrome + ": " + sUpcomingGamesLink + "\', \'WT.dl\', \'6\');", "_self");
        };
        mcUpcoming.attachMovie("rule", "mcRule", 1);
        mcRule = mcUpcoming.mcRule;
        mcRule._x = 1;
        mcRule._y = 15;
        loadUpcomingGames();
    } // End of the function
    function loadUpcomingGames()
    {
        for (var _loc2 = 0; _loc2 < nLengthUpcoming; ++_loc2)
        {
            mcUpcoming.createEmptyMovieClip("mcUpcomingGames" + _loc2, _loc2 + 2);
            mcUpcomingGames = mcUpcoming["mcUpcomingGames" + _loc2];
            mcUpcomingGames._x = 8;
            mcUpcomingGames._y = 22 + _loc2 * 18;
            mcUpcomingGames.createTextField("txtUpcoming", 0, 0, 0, 280, 20);
            mcTxtUpcomingGames = mcUpcomingGames.txtUpcoming;
            var _loc3 = new TextFormat();
            _loc3.color = 6710886;
            _loc3.font = "Verdana";
            _loc3.size = 11;
            mcTxtUpcomingGames.autoSize = "left";
            mcTxtUpcomingGames.html = true;
            mcTxtUpcomingGames.htmlText = EscChar.getEscChar(aTxtUpcoming[_loc2]);
            mcTxtUpcomingGames.selectable = false;
            mcTxtUpcomingGames.setTextFormat(_loc3);
            mcUpcomingGames.num = _loc2;
            mcUpcomingGames.txt = mcUpcoming["mcUpcomingGames" + _loc2].txtUpcoming;
            mcUpcomingGames.onRollOver = function ()
            {
                var _loc2 = new TextFormat();
                _loc2.color = 3368448;
                _loc2.underline = true;
                this.txt.setTextFormat(_loc2);
            };
            mcUpcomingGames.onRollOut = function ()
            {
                var _loc2 = new TextFormat();
                _loc2.color = 6710886;
                _loc2.underline = false;
                this.txt.setTextFormat(_loc2);
            };
            mcUpcomingGames.onRelease = function ()
            {
                getURL("javascript:location.href=\'" + aLinksUpcoming[this.num] + "\'; javascript:dcsMultiTrack(\'DCS.dcsuri\', \'" + aLinksUpcoming[this.num] + "\', \'WT.ti\', \'Games: " + sUpcomingChrome + ": " + aTxtUpcoming[this.num] + "\', \'WT.dl\', \'6\');", "_self");
            };
        } // end of for
        loadUpcomingViewAll();
    } // End of the function

  2. #2
    codice:
    function loadUpcomingGames()
    {
        for (var _loc2 = 0; _loc2 < nLengthUpcoming; ++_loc2)
        {
            mcUpcoming.createEmptyMovieClip("mcUpcomingGames" + _loc2, _loc2 + 2);
            mcUpcomingGames = mcUpcoming["mcUpcomingGames" + _loc2];
            mcUpcomingGames._x = 8;
            mcUpcomingGames._y = 22 + _loc2 * 18;
            mcUpcomingGames.createTextField("txtUpcoming", 0, 0, 0, 280, 20);
            mcTxtUpcomingGames = mcUpcomingGames.txtUpcoming;
            var _loc3 = new TextFormat();
            _loc3.color = 6710886;
            _loc3.font = "Verdana";
            _loc3.size = 11;
            mcTxtUpcomingGames.autoSize = "left";
            mcTxtUpcomingGames.html = true;
            mcTxtUpcomingGames.htmlText = EscChar.getEscChar(aTxtUpcoming[_loc2]);
            mcTxtUpcomingGames.selectable = false;
            mcTxtUpcomingGames.setTextFormat(_loc3);
            mcUpcomingGames.num = _loc2;
            mcUpcomingGames.txt = mcUpcoming["mcUpcomingGames" + _loc2].txtUpcoming;
            mcUpcomingGames.onRollOver = function ()
            {
                var _loc2 = new TextFormat();
                _loc2.color = 3368448;
                _loc2.underline = true;
                this.txt.setTextFormat(_loc2);
            };
            mcUpcomingGames.onRollOut = function ()
            {
                var _loc2 = new TextFormat();
                _loc2.color = 6710886;
                _loc2.underline = false;
                this.txt.setTextFormat(_loc2);
            };
            mcUpcomingGames.onRelease = function ()
            {
                getURL("javascript:location.href=\'" + aLinksUpcoming[this.num] + "\'; javascript:dcsMultiTrack(\'DCS.dcsuri\', \'" + aLinksUpcoming[this.num] + "\', \'WT.ti\', \'Games: " + sUpcomingChrome + ": " + aTxtUpcoming[this.num] + "\', \'WT.dl\', \'6\');", "_self");
            };
        } // end of for
        loadUpcomingViewAll();
    } // End of the function
    function loadUpcomingViewAll()
    {
        mcUpcoming.createEmptyMovieClip("mcUpcomingViewAll", mcUpcoming.getNextHighestDepth());
        mcUpcomingViewAll = mcUpcoming.mcUpcomingViewAll;
        mcUpcomingViewAll._x = 8;
        mcUpcomingViewAll._y = mcUpcomingGames._y + 28;
        mcUpcomingViewAll.createTextField("txtUpcomingViewAll", 0, 0, 0, 280, 20);
        mcTxtUpcomingViewAll = mcUpcomingViewAll.txtUpcomingViewAll;
        var txtUpcomingViewAllFmt = new TextFormat();
        txtUpcomingViewAllFmt.bold = true;
        txtUpcomingViewAllFmt.color = 3368448;
        txtUpcomingViewAllFmt.font = "Verdana";
        txtUpcomingViewAllFmt.size = 11;
        mcTxtUpcomingViewAll.autoSize = "left";
        mcTxtUpcomingViewAll.html = true;
        mcTxtUpcomingViewAll.htmlText = EscChar.getEscChar(sUpcomingViewAll);
        mcTxtUpcomingViewAll.selectable = false;
        mcTxtUpcomingViewAll.setTextFormat(txtUpcomingViewAllFmt);
        mcUpcomingViewAll.onRollOver = function ()
        {
            txtUpcomingViewAllFmt.underline = true;
            mcTxtUpcomingViewAll.setTextFormat(txtUpcomingViewAllFmt);
        };
        mcUpcomingViewAll.onRollOut = function ()
        {
            txtUpcomingViewAllFmt.underline = false;
            mcTxtUpcomingViewAll.setTextFormat(txtUpcomingViewAllFmt);
        };
        mcUpcomingViewAll.onRelease = function ()
        {
            getURL("javascript:location.href=\'" + sUpcomingGamesLink + "\'; javascript:dcsMultiTrack(\'DCS.dcsuri\', \'" + sUpcomingGamesLink + "\', \'WT.ti\', \'Games: " + sUpcomingChrome + ": " + sUpcomingGamesLink + "\', \'WT.dl\', \'6\');", "_self");
        };
    } // End of the function
    function loadGph(mc, sUrl)
    {
        mcTarget = mc;
        mcHit.enabled = false;
        if (bRotate)
        {
            clearInterval(autoRotateID);
        } // end if
        var tAlpha;
        tAlpha = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 100, 0, nSpeed, true);
        tAlpha.onMotionFinished = function ()
        {
            mc.unloadMovie();
            var _loc2 = new MovieClipLoader();
            var _loc1 = new Object();
            _loc1.onLoadStart = function (mcTarget)
            {
                mc.stop();
            };
            _loc1.onLoadProgress = function (mcTarget, nBytesLoaded, nBytesTotal)
            {
            };
            _loc1.onLoadInit = function (mcTarget)
            {
                mc.cacheAsBitmap = true;
                tAlpha = new mx.transitions.Tween(mc, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, nSpeed, true);
                if (bFirstRun)
                {
                    bFirstRun = !bFirstRun;
                    enableGtns();
                    createHit();
                    createTxt();
                    createColGraphic();
                } // end if
                if (bRotate)
                {
                    rotateGtns();
                } // end if
                var _loc1 = new mx.transitions.Tween(mcMaskTxt, "_y", mx.transitions.easing.Strong.easeOut, nDockY, mcTxt._y, nSpeed + 7.500000E-001, true);
                mcHit.enabled = true;
                clickHit();
                mc.play();
            };
            _loc2.addListener(_loc1);
            _loc2.loadClip(sUrl, mcTarget);
        };
    } // End of the function
    function initGtns()
    {
        nSpacer = 14;
        nOffset = 2;
        nMin = 16;
        nMid = 24;
        nMax = 32 + nOffset * 2;
        if (nLength % 2 == 0)
        {
            if (nLength > 2)
            {
                nCenter = 1;
                nActualCtr = 1;
            }
            else
            {
                nCenter = 0;
                nActualCtr = 0;
            } // end else if
            mcDock._x = nDockX - nMid / 2;
        }
        else
        {
            nCenter = Math.floor(nLength / 2);
            nActualCtr = Math.floor(nLength / 2);
            mcDock._x = nDockX;
        } // end else if
        mcDock._y = nDockY;
        loadGph(mcGph, aGphs[nCenter]);
        mcCenter = mcDock["mcGtn" + nCenter];
        mcLeft = mcDock["mcGtn" + (nCenter - 1)];
        mcRight = mcDock["mcGtn" + (nCenter + 1)];
        mcCenter._width = mcCenter._height = nMax;
        mcLeft._width = mcLeft._height = nMid;
        mcRight._width = mcRight._height = nMid;
        mcCenter._x = mcCenter._x;
        mcLeft._x = mcCenter._x - (nMid + nSpacer);
        mcRight._x = mcCenter._x + (nMid + nSpacer);
        var _loc1 = 0;
        var _loc2 = nCenter - 2;
        while (_loc1 < nCenter - 1)
        {
            mcGtns = mcDock["mcGtn" + _loc1];
            mcGtns._width = 80;
    		mcGtns._height = 20;
            mcGtnStart = mcDock["mcGtn" + (nCenter - 2)];
            mcGtnStart._width = mcGtnStart._height = nMin;
            mcGtnStart._x = 80;
            mcGtns._x = mcGtnStart._x - (nMid / 2 + nSpacer) * _loc2;
            _loc1++;
            _loc2--;
        } // end while
        _loc1 = nCenter + 2;
        _loc2 = 0;
        while (_loc1 < nLength)
        {
            mcGtns = mcDock["mcGtn" + _loc1];
            mcGtns._width = mcGtns._height = nMin;
            mcGtnStart = mcDock["mcGtn" + (nCenter + 2)];
            mcGtnStart._width = mcGtnStart._height = nMin;
            mcGtnStart._x = mcRight._x + (mcRight._width - nMin / 2 + nSpacer);
            mcGtns._x = mcGtnStart._x + (nMid / 2 + nSpacer) * _loc2;
            _loc1++;
            _loc2++;
        } // end while
        colorBorders();
        saveGtns();
        maskGtns();
    } // End of the function
    function maskGtns()
    {
        root.attachMovie("mask", "mcMaskGtns", root.getNextHighestDepth());
        mcDock.setMask(mcMaskGtns);
        mcMaskGtns._x = 80;
        mcMaskGtns._y = 20;
        mcMaskGtns._width = 10;
        mcMaskGtns._height = 20;
        var _loc1 = new mx.transitions.Tween(mcMaskGtns, "_y", mx.transitions.easing.Strong.easeOut, mcMaskGtns._y, mcMaskGtns._y - (nMax + 2), nSpeed + 5.000000E-001, true);
        _loc1 = new mx.transitions.Tween(mcMaskGradient, "_y", mx.transitions.easing.Strong.easeOut, mcMaskGradient._y, mcGradient._y - 11, nSpeed + 7.500000E-001, true);
        navGtns();
    } // End of the function

  3. #3
    [CODE]function saveGtns()
    {
    for (var _loc1 = 0; _loc1 < nLength; ++_loc1)
    {
    mcGtns = mcDock["mcGtn" + _loc1];
    aXPos.push(mcGtns._x);
    } // end of for
    } // End of the function
    function sizeGtns()
    {
    mcLeft = mcDock["mcGtn" + (nCenter - 1)];
    mcRight = mcDock["mcGtn" + (nCenter + 1)];
    scaleGtns(mcCenter, nMax, nSpeed);
    scaleGtns(mcLeft, nMid, nSpeed);
    scaleGtns(mcRight, nMid, nSpeed);
    var _loc1 = 0;
    var _loc2 = nCenter - 2;
    while (_loc1 < nCenter - 1)
    {
    mcGtns = mcDock["mcGtn" + _loc1];
    scaleGtns(mcGtns, nMin, nSpeed);
    mcGtnStart = mcDock["mcGtn" + (nCenter - 2)];
    scaleGtns(mcGtnStart, nMin, nSpeed);
    _loc1++;
    _loc2--;
    } // end while
    _loc1 = nCenter + 2;
    _loc2 = 0;
    while (_loc1 < nLength)
    {
    mcGtns = mcDock["mcGtn" + _loc1];
    scaleGtns(mcGtns, nMin, nSpeed);
    mcGtnStart = mcDock["mcGtn" + (nCenter + 2)];
    scaleGtns(mcGtnStart, nMin, nSpeed);
    _loc1++;
    _loc2++;
    } // end while
    navGtns();
    } // End of the function
    function scaleGtns(mc, nFinish, nDur)
    {
    var _loc5 = new mx.transitions.Tween(mc, "_width", mx.transitions.easing.Strong.easeOut, mc._width, nFinish, nDur, true);
    var _loc4 = new mx.transitions.Tween(mc, "_height", mx.transitions.easing.Strong.easeOut, mc._height, nFinish, nDur, true);
    } // End of the function
    function navGtns()
    {
    for (var _loc2 = 0; _loc2 < nLength; ++_loc2)
    {
    mcGtns = mcDock["mcGtn" + _loc2];
    mcGtns.center = _loc2;
    mcGtns.onRollOver = function ()
    {
    clearInterval(autoRotateID);
    bRotate = false;
    nCenter = this.center;
    mcCenter = mcDock["mcGtn" + nCenter];
    this = mcCenter;
    colorBorders();
    sizeGtns();
    slideGtns();
    };
    mcGtns.onRollOut = mcGtns.onReleaseOutside = function ()
    {
    detectMousePos();
    };
    mcGtns.onRelease = function ()
    {
    if (this == mcDock["mcGtn" + nActualCtr])
    {
    null;
    }
    else
    {
    nCenter = this.center;
    nActualCtr = nCenter;
    mcCenter = mcDock["mcGtn" + nCenter];
    this = mcCenter;
    loadTxt(aTxt[nActualCtr]);
    loadGph(mcGph, aGphs[nCenter]);
    colorBorders();
    sizeGtns();
    slideGtns();
    } // end else if
    };
    } // end of for
    } // End of the function
    function findCenter()
    {
    nCenter = nActualCtr;
    mcCenter = mcDock["mcGtn" + nCenter];
    this = mcCenter;
    colorBorders();
    sizeGtns();
    slideGtns();
    } // End of the function
    function detectMousePos()
    {
    nTop = -nMax - 10;
    nRight = nDockX + mcDock._width / 2 + 5;
    nBottom = nDockY + 4;
    nLeft = nDockX - mcDock._width / 2 - 5;
    root.onMouseMove = function ()
    {
    nXPos = Math.floor(_xmouse);
    nYPos = Math.floor(_ymouse);
    if (nYPos < nDockY + nTop)
    {
    findCenter();
    delete onMouseMove;
    }
    else if (nYPos > nBottom)
    {
    findCenter();
    delete onMouseMove;
    }
    else if (nXPos < nLeft)
    {
    findCenter();
    delete onMouseMove;
    }
    else if (nXPos > nRight)
    {
    findCenter();
    delete onMouseMove;
    } // end else if
    updateAfterEvent();
    };
    } // End of the function
    function slideGtns()
    {
    var _loc1;
    if (nLength == 2)
    {
    if (nCenter == 0)
    {
    _loc1 = new mx.transitions.Tween(mcCenter, "_x", mx.transitions.easing.Strong.easeOut, mcCenter._x, aXPos[0], nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcRight, "_x", mx.transitions.easing.Strong.easeOut, mcRight._x, aXPos[1], nSpeed, true);
    }
    else if (nCenter == 1)
    {
    _loc1 = new mx.transitions.Tween(mcLeft, "_x", mx.transitions.easing.Strong.easeOut, mcLeft._x, aXPos[0], nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcCenter, "_x", mx.transitions.easing.Strong.easeOut, mcCenter._x, aXPos[1], nSpeed, true);
    } // end else if
    }
    else if (nLength == 3)
    {
    if (nCenter == 0)
    {
    _loc1 = new mx.transitions.Tween(mcCenter, "_x", mx.transitions.easing.Strong.easeOut, mcCenter._x, aXPos[0] + nMin / 2 + nOffset * 2, nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcRight, "_x", mx.transitions.easing.Strong.easeOut, mcRight._x, aXPos[1] + nMin / 2 + nOffset * 2, nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcDock.mcGtn2, "_x", mx.transitions.easing.Strong.easeOut, mcDock.mcGtn2._x, aXPos[2] + nOffset * 2, nSpeed, true);
    }
    else if (nCenter == 1)
    {
    _loc1 = new

  4. #4
    [CODE]function saveGtns()
    {
    for (var _loc1 = 0; _loc1 < nLength; ++_loc1)
    {
    mcGtns = mcDock["mcGtn" + _loc1];
    aXPos.push(mcGtns._x);
    } // end of for
    } // End of the function
    function sizeGtns()
    {
    mcLeft = mcDock["mcGtn" + (nCenter - 1)];
    mcRight = mcDock["mcGtn" + (nCenter + 1)];
    scaleGtns(mcCenter, nMax, nSpeed);
    scaleGtns(mcLeft, nMid, nSpeed);
    scaleGtns(mcRight, nMid, nSpeed);
    var _loc1 = 0;
    var _loc2 = nCenter - 2;
    while (_loc1 < nCenter - 1)
    {
    mcGtns = mcDock["mcGtn" + _loc1];
    scaleGtns(mcGtns, nMin, nSpeed);
    mcGtnStart = mcDock["mcGtn" + (nCenter - 2)];
    scaleGtns(mcGtnStart, nMin, nSpeed);
    _loc1++;
    _loc2--;
    } // end while
    _loc1 = nCenter + 2;
    _loc2 = 0;
    while (_loc1 < nLength)
    {
    mcGtns = mcDock["mcGtn" + _loc1];
    scaleGtns(mcGtns, nMin, nSpeed);
    mcGtnStart = mcDock["mcGtn" + (nCenter + 2)];
    scaleGtns(mcGtnStart, nMin, nSpeed);
    _loc1++;
    _loc2++;
    } // end while
    navGtns();
    } // End of the function
    function scaleGtns(mc, nFinish, nDur)
    {
    var _loc5 = new mx.transitions.Tween(mc, "_width", mx.transitions.easing.Strong.easeOut, mc._width, nFinish, nDur, true);
    var _loc4 = new mx.transitions.Tween(mc, "_height", mx.transitions.easing.Strong.easeOut, mc._height, nFinish, nDur, true);
    } // End of the function
    function navGtns()
    {
    for (var _loc2 = 0; _loc2 < nLength; ++_loc2)
    {
    mcGtns = mcDock["mcGtn" + _loc2];
    mcGtns.center = _loc2;
    mcGtns.onRollOver = function ()
    {
    clearInterval(autoRotateID);
    bRotate = false;
    nCenter = this.center;
    mcCenter = mcDock["mcGtn" + nCenter];
    this = mcCenter;
    colorBorders();
    sizeGtns();
    slideGtns();
    };
    mcGtns.onRollOut = mcGtns.onReleaseOutside = function ()
    {
    detectMousePos();
    };
    mcGtns.onRelease = function ()
    {
    if (this == mcDock["mcGtn" + nActualCtr])
    {
    null;
    }
    else
    {
    nCenter = this.center;
    nActualCtr = nCenter;
    mcCenter = mcDock["mcGtn" + nCenter];
    this = mcCenter;
    loadTxt(aTxt[nActualCtr]);
    loadGph(mcGph, aGphs[nCenter]);
    colorBorders();
    sizeGtns();
    slideGtns();
    } // end else if
    };
    } // end of for
    } // End of the function
    function findCenter()
    {
    nCenter = nActualCtr;
    mcCenter = mcDock["mcGtn" + nCenter];
    this = mcCenter;
    colorBorders();
    sizeGtns();
    slideGtns();
    } // End of the function
    function detectMousePos()
    {
    nTop = -nMax - 10;
    nRight = nDockX + mcDock._width / 2 + 5;
    nBottom = nDockY + 4;
    nLeft = nDockX - mcDock._width / 2 - 5;
    root.onMouseMove = function ()
    {
    nXPos = Math.floor(_xmouse);
    nYPos = Math.floor(_ymouse);
    if (nYPos < nDockY + nTop)
    {
    findCenter();
    delete onMouseMove;
    }
    else if (nYPos > nBottom)
    {
    findCenter();
    delete onMouseMove;
    }
    else if (nXPos < nLeft)
    {
    findCenter();
    delete onMouseMove;
    }
    else if (nXPos > nRight)
    {
    findCenter();
    delete onMouseMove;
    } // end else if
    updateAfterEvent();
    };
    } // End of the function
    function slideGtns()
    {
    var _loc1;
    if (nLength == 2)
    {
    if (nCenter == 0)
    {
    _loc1 = new mx.transitions.Tween(mcCenter, "_x", mx.transitions.easing.Strong.easeOut, mcCenter._x, aXPos[0], nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcRight, "_x", mx.transitions.easing.Strong.easeOut, mcRight._x, aXPos[1], nSpeed, true);
    }
    else if (nCenter == 1)
    {
    _loc1 = new mx.transitions.Tween(mcLeft, "_x", mx.transitions.easing.Strong.easeOut, mcLeft._x, aXPos[0], nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcCenter, "_x", mx.transitions.easing.Strong.easeOut, mcCenter._x, aXPos[1], nSpeed, true);
    } // end else if
    }
    else if (nLength == 3)
    {
    if (nCenter == 0)
    {
    _loc1 = new mx.transitions.Tween(mcCenter, "_x", mx.transitions.easing.Strong.easeOut, mcCenter._x, aXPos[0] + nMin / 2 + nOffset * 2, nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcRight, "_x", mx.transitions.easing.Strong.easeOut, mcRight._x, aXPos[1] + nMin / 2 + nOffset * 2, nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcDock.mcGtn2, "_x", mx.transitions.easing.Strong.easeOut, mcDock.mcGtn2._x, aXPos[2] + nOffset * 2, nSpeed, true);
    }
    else if (nCenter == 1)
    {
    _loc1 = new mx.transitions.Tween(mcLeft, "_x", mx.transitions.easing.Strong.easeOut, mcLeft._x, aXPos[0], nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcCenter, "_x", mx.transitions.easing.Strong.easeOut, mcCenter._x, aXPos[1], nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcRight, "_x", mx.transitions.easing.Strong.easeOut, mcRight._x, aXPos[2], nSpeed, true);
    }
    else if (nCenter == 2)
    {
    _loc1 = new mx.transitions.Tween(mcDock.mcGtn0, "_x", mx.transitions.easing.Strong.easeOut, mcDock.mcGtn0._x, aXPos[0] - nOffset * 2, nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcLeft, "_x", mx.transitions.easing.Strong.easeOut, mcLeft._x, aXPos[1] - (nMin / 2 + nOffset * 2), nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcCenter, "_x", mx.transitions.easing.Strong.easeOut, mcCenter._x, aXPos[2] - (nMin / 2 + nOffset * 2), nSpeed, true);
    } // end else if
    }
    else if (nLength == 4)
    {
    if (nCenter == 0)
    {
    _loc1 = new mx.transitions.Tween(mcCenter, "_x", mx.transitions.easing.Strong.easeOut, mcCenter._x, aXPos[0] + nMin / 2 + nOffset * 2, nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcRight, "_x", mx.transitions.easing.Strong.easeOut, mcRight._x, aXPos[1] + nMin / 2 + nOffset * 2, nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcDock.mcGtn2, "_x", mx.transitions.easing.Strong.easeOut, mcDock.mcGtn2._x, aXPos[2] + nOffset * 2, nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcDock.mcGtn3, "_x", mx.transitions.easing.Strong.easeOut, mcDock.mcGtn3._x, aXPos[3], nSpeed, true);
    }
    else if (nCenter == 1)
    {
    _loc1 = new mx.transitions.Tween(mcLeft, "_x", mx.transitions.easing.Strong.easeOut, mcLeft._x, aXPos[0], nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcCenter, "_x", mx.transitions.easing.Strong.easeOut, mcCenter._x, aXPos[1], nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcRight, "_x", mx.transitions.easing.Strong.easeOut, mcRight._x, aXPos[2], nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcDock.mcGtn3, "_x", mx.transitions.easing.Strong.easeOut, mcDock.mcGtn3._x, aXPos[3], nSpeed, true);
    }
    else if (nCenter == 2)
    {
    _loc1 = new mx.transitions.Tween(mcDock.mcGtn0, "_x", mx.transitions.easing.Strong.easeOut, mcDock.mcGtn0._x, aXPos[0] - nOffset * 2, nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcLeft, "_x", mx.transitions.easing.Strong.easeOut, mcLeft._x, aXPos[1] - (nMin / 2 + nOffset * 2), nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcCenter, "_x", mx.transitions.easing.Strong.easeOut, mcCenter._x, aXPos[2] - (nMin / 2 + nOffset * 2), nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcRight, "_x", mx.transitions.easing.Strong.easeOut, mcRight._x, aXPos[3] - nOffset * 2, nSpeed, true);
    }
    else if (nCenter == 3)
    {
    _loc1 = new mx.transitions.Tween(mcDock.mcGtn0, "_x", mx.transitions.easing.Strong.easeOut, mcDock.mcGtn0._x, aXPos[0] - nOffset, nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcDock.mcGtn1, "_x", mx.transitions.easing.Strong.easeOut, mcDock.mcGtn1._x, aXPos[1] - nMid / 2, nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcLeft, "_x", mx.transitions.easing.Strong.easeOut, mcLeft._x, aXPos[2] - nMin - nOffset, nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcCenter, "_x", mx.transitions.easing.Strong.easeOut, mcCenter._x, aXPos[3] - nMin / 2, nSpeed, true);
    } // end else if
    }
    else if (nLength == nLength)
    {
    if (nCenter == 0)
    {
    _loc1 = new mx.transitions.Tween(mcCenter, "_x", mx.transitions.easing.Strong.easeOut, mcCenter._x, aXPos[0] + nMin / 2, nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcRight, "_x", mx.transitions.easing.Strong.easeOut, mcRight._x, aXPos[1] + nMin + nOffset, nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcDock.mcGtn2, "_x", mx.transitions.easing.Strong.easeOut, mcDock.mcGtn2._x, aXPos[2] + nMid / 2, nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcDock.mcGtn3, "_x", mx.transitions.easing.Strong.easeOut, mcDock.mcGtn3._x, aXPos[3] + nOffset, nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcDock.mcGtn4, "_x", mx.transitions.easing.Strong.easeOut, mcDock.mcGtn4._x, aXPos[4], nSpeed, true);
    }
    else if (nCenter == 1)
    {
    _loc1 = new mx.transitions.Tween(mcLeft, "_x", mx.transitions.easing.Strong.easeOut, mcLeft._x, aXPos[0] + nOffset * 2, nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcCenter, "_x", mx.transitions.easing.Strong.easeOut, mcCenter._x, aXPos[1] + nMin / 2 + nOffset * 2, nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcRight, "_x", mx.transitions.easing.Strong.easeOut, mcRight._x, aXPos[2] + nMin / 2 + nOffset * 2, nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcDock.mcGtn3, "_x", mx.transitions.easing.Strong.easeOut, mcDock.mcGtn3._x, aXPos[3] + nOffset * 2, nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcDock.mcGtn4, "_x", mx.transitions.easing.Strong.easeOut, mcDock.mcGtn4._x, aXPos[4], nSpeed, true);
    }
    else if (nCenter == 2)
    {
    _loc1 = new mx.transitions.Tween(mcDock.mcGtn0, "_x", mx.transitions.easing.Strong.easeOut, mcDock.mcGtn0._x, aXPos[0], nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcLeft, "_x", mx.transitions.easing.Strong.easeOut, mcLeft._x, aXPos[1], nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcCenter, "_x", mx.transitions.easing.Strong.easeOut, mcCenter._x, aXPos[2], nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcRight, "_x", mx.transitions.easing.Strong.easeOut, mcRight._x, aXPos[3], nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcDock.mcGtn4, "_x", mx.transitions.easing.Strong.easeOut, mcDock.mcGtn4._x, aXPos[4], nSpeed, true);
    }
    else if (nCenter == 3)
    {
    _loc1 = new mx.transitions.Tween(mcDock.mcGtn0, "_x", mx.transitions.easing.Strong.easeOut, mcDock.mcGtn0._x, aXPos[0], nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcDock.mcGtn1, "_x", mx.transitions.easing.Strong.easeOut, mcDock.mcGtn1._x, aXPos[1] - nOffset * 2, nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcLeft, "_x", mx.transitions.easing.Strong.easeOut, mcLeft._x, aXPos[2] - (nMin / 2 + nOffset * 2), nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcCenter, "_x", mx.transitions.easing.Strong.easeOut, mcCenter._x, aXPos[3] - (nMin / 2 + nOffset * 2), nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcRight, "_x", mx.transitions.easing.Strong.easeOut, mcRight._x, aXPos[4] - nOffset * 2, nSpeed, true);
    }
    else if (nCenter == 4)
    {
    _loc1 = new mx.transitions.Tween(mcDock.mcGtn0, "_x", mx.transitions.easing.Strong.easeOut, mcDock.mcGtn0._x, aXPos[0], nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcDock.mcGtn1, "_x", mx.transitions.easing.Strong.easeOut, mcDock.mcGtn1._x, aXPos[1] - nOffset, nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcDock.mcGtn2, "_x", mx.transitions.easing.Strong.easeOut, mcDock.mcGtn2._x, aXPos[2] - nMid / 2, nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcLeft, "_x", mx.transitions.easing.Strong.easeOut, mcLeft._x, aXPos[3] - nMin - nOffset, nSpeed, true);
    _loc1 = new mx.transitions.Tween(mcCenter, "_x", mx.transitions.easing.Strong.easeOut, mcCenter._x, aXPos[4] - nMin / 2, nSpeed, true);
    } // end else if
    } // end else if
    } // End of the function
    stop ();
    CODE]

  5. #5
    Scusate per la lunghezza del codice ma non so che punto postare

  6. #6
    nesuno lo sa? è importante

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.