Visualizzazione risultati 1 fino 5 di 5

Discussione: Action Script e partenza ritardata

  1. #1
    ciroricci non è connesso Neofita
    Data registrazione
    20-10-2004
    Messaggi
    28

    Predefinito Action Script e partenza ritardata

    Ciao a tutti approfitto di questo spazio per cercare qualcuno che ne capisca abbastanza di as e che possa risolvere il mio problema....in pratica sto studiando un fla di un menu e non riesco a capire quale sia la riga di codice che comanda l'entrata in campo dei bottoni del menu ...che ritardano qualche secondo ....il fla originale si può scaricare qui http://141.250.11.110/aimlive/aimlive2.fla

    Help

  2. #2
    Guest

    Predefinito

    E' stato fatto con la MX 2004, e io non posso aprirlo.
    Se posti qui lo script posso provare ad aiutarti.


    Ciaooooo!!!!!

  3. #3
    ciroricci non è connesso Neofita
    Data registrazione
    20-10-2004
    Messaggi
    28

    Predefinito

    easeSpeed = 3;
    slider_mc.onEnterFrame = function ()
    {
    this._x = this._x + (xMove1 - this._x) / easeSpeed;
    };
    button_1.onPress = function ()
    {
    video.gotoAndPlay(1);
    };
    button_2.onPress = function ()
    {
    video.gotoAndPlay("last");
    };
    button_3.onPress = function ()
    {
    slider.xMove = -25;
    menu.play();
    };
    button_4.onPress = function ()
    {
    slider.xMove = -1475;
    };
    trailer._visible = false;
    video._visible = true;
    video.gotoAndPlay(1);
    function checkSection()
    {
    if (_root.playVideo != 1)
    {
    if (_root.outroTime != 0)
    {
    _root.outroTime++;
    if (_root.outroTime > _root.cycle)
    {
    gotoScene = _root.section == "outro" ? ("intro") : ("outro");
    _level0.video.gotoAndPlay(gotoScene);
    _root.outroTime = 0;
    } // end if
    } // end if
    } // end if
    } // End of the function
    function playTrailer()
    {
    _root.outroTime = 0;
    _root.playVideo = 1;
    reset();
    } // End of the function
    function music(n)
    {
    if (n == 0)
    {
    video.music.gotoAndStop(2);
    introSound.stop();
    rain.stop();
    }
    else
    {
    video.music.gotoAndStop(1);
    introSound.start();
    rain.start();
    } // end if
    } // End of the function
    function getMax(obj, n)
    {
    var _l3 = 0;
    for (x = 1; x < obj.length + 1; x++)
    {
    if (x == 1)
    {
    _l3 = obj[x][n] > obj[x - 1][n] ? (obj[x][n]) : (obj[x - 1][n]);
    continue;
    } // end if
    _l3 = _l3 > obj[x - 1][n] ? (_l3) : (obj[x - 1][n]);
    } // end of for
    return(_l3);
    } // End of the function
    function init()
    {
    for (x = 1; x < 6; x++)
    {
    var obj = eval("menu" + x);
    obj._alpha = 0;
    obj.set = 1;
    obj.bg._visible = false;
    obj.clip1.loadMovie("clip" + x + ".swf");
    obj.clip1.stop;
    obj.clip1._visible = false;
    } // end of for
    startArray = fisherYates(startArray);
    scaleArray = fisherYates(scaleArray);
    alphaArray = fisherYates(alphaArray);
    } // End of the function
    function reset()
    {
    _root.resetMenu = 1;
    for (x = 1; x < 6; x++)
    {
    var obj = eval("menu" + x);
    obj.scale = 15;
    obj.transparency = alphaArray[x - 1];
    obj.sX = fixArray[x - 1][0];
    obj.sY = fixArray[x - 1][1];
    obj.xMove = moveMenu(obj, 1)[0];
    obj.yMove = moveMenu(obj, 1)[1];
    obj.reset = 1;
    } // end of for
    } // End of the function
    function reposition(n)
    {
    xCenter = 290;
    yCenter = 150;
    useArray = n == 1 ? (startArray) : (formationArray[0]);
    if (n == 1)
    {
    } // end if
    for (x = 1; x < 6; x++)
    {
    var obj = eval("menu" + x);
    obj.reset = 0;
    obj.scale = scaleArray[x - 1];
    obj.transparency = alphaArray[x - 1];
    obj.set = 0;
    obj.sX = useArray[x - 1][0];
    obj.sY = useArray[x - 1][1];
    obj.xMove = moveMenu(obj, n)[0];
    obj.yMove = moveMenu(obj, n)[1];
    obj.grid2.stop();
    obj.grid1.stop();
    obj.grid2._visible = false;
    obj.grid1._visible = false;
    } // end of for
    useArray = fisherYates(useArray);
    scaleArray = fisherYates(scaleArray);
    alphaArray = fisherYates(alphaArray);
    } // End of the function
    function moveMenu(obj, pos)
    {
    if (!_root.playVideo)
    {
    nSound = new Sound();
    nSound.attachSound("sound3");
    nSound.start();
    } // end if
    obj.xMove = obj.sX + setPositionX[pos - 1][0];
    obj.yMove = obj.sY - setPositionX[pos - 1][1];
    return([obj.xMove, obj.yMove]);
    } // End of the function
    function fisherYates(myArray)
    {
    var _l1 = myArray.length;
    if (_l1 == 0)
    {
    return(false);
    } // end if
    _l1--;
    if (_l1--)
    {
    var _l3 = Math.floor(Math.random() * (_l1 + 1));
    var _l5 = myArray[_l1];
    var _l4 = myArray[_l3];
    myArray[_l1] = _l4;
    myArray[_l3] = _l5;

    } // end if
    return(myArray);
    } // End of the function
    function enterGrid(obj, n, xSpeed, ySpeed, xOffset, yOffset, yDecel, xDecel)
    {
    mouseXFactor = (_xmouse - xCenter) / Math.abs(_xmouse - (xCenter + 0.001000)) * 0.001000;
    mouseYFactor = (_ymouse - yCenter) / Math.abs(_ymouse - (yCenter + 0.001000)) * 0.001000;
    var _l3 = menuSpeed[n - 1];
    obj.xSpeed = _l3;
    if (obj.reset == 0)
    {
    obj.diffX = obj.sX * mouseXFactor - _xmouse + xCenter;
    obj.diffY = obj.sY * mouseYFactor - _ymouse + yCenter;
    }
    else
    {
    obj.diffX = obj.sX - xCenter;
    obj.diffY = obj.sY - yCenter;
    } // end if
    obj.t = obj.t + 0.010000;
    if (obj.set == 0)
    {
    if (obj.reset == 0)
    {
    obj._x = obj._x + (n * mouseXFactor + (obj.diffX * 0.100000 + 2 * xCenter - obj.xMove - obj._x) / _l3);
    obj._y = obj._y + (n * mouseYFactor + (obj.diffY * 0.100000 + 2 * yCenter - obj.yMove - obj._y) / ySpeed);
    if (_root.over)
    {
    if (!obj.over)
    {
    obj._xscale = obj._yscale = obj._yscale + (obj.scale * 0.700000 - obj._xscale) / 15;
    obj._alpha = obj._alpha + (obj.transparency * 0.700000 - obj._alpha) / 15;
    }
    else
    {
    obj._xscale = obj._yscale = obj._yscale + (90 - obj._xscale) / 15;
    } // end if
    _root.outroTime = 0;
    obj._visible = obj._alpha < 1 ? (false) : (true);
    }
    else
    {
    obj.clip1._visible = false;
    obj.clip1.stop();
    obj._alpha = obj._alpha + (obj.transparency - obj._alpha) / 15;
    obj._xscale = obj._yscale = obj._yscale + (obj.scale - obj._xscale) / 15;
    obj._visible = obj._alpha < 1 ? (false) : (true);
    if (getTimer() % 500 == 0)
    {
    reposition(_root.setMenuPosition);
    } // end if
    } // end if
    }
    else
    {
    obj._x = obj._x + (obj.xMove + 90 - obj._x) / 3;
    obj._y = obj._y + (obj.yMove + 30 - obj._y) / 3;
    obj._xscale = obj._yscale = obj._yscale + (obj.scale - obj._xscale) / 5;
    obj._alpha = obj._alpha + -obj._alpha / 10;
    obj._visible = obj._alpha < 1 ? (false) : (true);
    } // end if
    } // end if
    } // End of the function
    function overRideEnter(obj)
    {
    if (obj._currentframe != 10)
    {
    obj.play();
    } // end if
    obj.diffX = obj.sX - _xmouse;
    obj.diffY = obj.sY - _ymouse;
    if (!obj.goPress)
    {
    obj._x = obj._x + (obj.diffX - obj._x) / 20;
    obj._y = obj._y + (obj.diffY - obj._y) / 40;
    obj.killGrid = 1;
    }
    else
    {
    obj._x = obj._x + (obj.xMove - obj._x) / 10;
    obj._y = obj._y + (obj.yMove - obj._y) / 20;
    if (Math.abs(obj.yMove - obj._y) <= 1)
    {
    if (obj.killGrid)
    {
    killFlyMenu(obj);
    } // end if
    } // end if
    } // end if
    } // End of the function

  4. #4
    ciroricci non è connesso Neofita
    Data registrazione
    20-10-2004
    Messaggi
    28

    Predefinito

    function killFlyMenu(obj)
    {
    if (!obj.videoPlay)
    {
    obj.gotoAndStop(10);
    obj.clip1._visible = true;
    obj.blockT.gotoAndStop(1);
    obj.blockT.content.text = "";
    obj.grid.gotoAndPlay(random(50));
    obj.grid.alpha = 50;
    } // end if
    obj.videoPlay = 1;
    } // End of the function
    function hilightMenu(obj, d, num)
    {
    if (d == 0)
    {
    rSound = new Sound();
    rSound.attachSound("rollover");
    rSound.start();
    _root.outroTime = 0;
    _root.menuPause = 1;
    _root.over = 1;
    obj.over = 1;
    obj._alpha = 95;
    obj.clip1.play();
    obj.clip1._alpha = 100;
    obj.clip1._visible = true;
    obj.bg._visible = true;
    obj.bg.title.gotoAndStop(num);
    }
    else
    {
    _root.over = 0;
    obj.over = 0;
    obj._alpha = 35;
    _root.outroTime = 1;
    _root.menuPause = 1;
    obj.clip1._visible = false;
    obj.bg._visible = false;
    obj.blockT.content.text = "";
    } // end if
    } // End of the function
    function doMenu(obj, num)
    {
    _root.pressed = 1;
    if (!_root.reset && !_root.goMenu)
    {
    _level0.video.traileranim.gotoAndPlay(16);
    for (x = 0; x < 5; x++)
    {
    if (x + 1 != num)
    {
    o = eval("menu" + (x + 1));
    o.gotoAndStop(1);
    o._alpha = 35;
    o.goPress = 0;
    if (x + 1 == _root.pressed)
    {
    o._xscale = o._yscale = scaleArray[_root.pressed - 1];
    o.yMove = _root.posY;
    _root.pNum = eval("menu" + num);
    o.goPress = 1;
    o.finish = 1;
    } // end if
    continue;
    } // end if
    obj.goPress = 1;
    obj.clip1.clip._visible = true;
    obj.clip1.clip.loadMovie("clip" + num + ".swf");
    obj.xMove = calculateRandom(130, 130);
    obj.yMove = calculateRandom(200, 200);
    } // end of for
    obj._alpha = obj.goPress ? (80) : (35);
    _root.pressed = num;
    _root.pNum = eval("menu" + num);
    }
    else
    {
    obj.goPress = !obj.goPress;
    theMenu();
    _level0.video.traileranim.gotoAndPlay(2);
    } // end if
    } // End of the function
    function endVideo()
    {
    _level0.video.tanim.gotoAndPlay("close");
    } // End of the function
    function theMenu(state, p)
    {
    if (state == "open")
    {
    _root.goMenu = 0;
    _root.setMenuPosition = p;
    reposition(p);
    } // end if
    if (state == "close")
    {
    _root.goMenu = 1;
    reset();
    } // end if
    if (state == "toggle")
    {
    if (_root.goMenu == 1)
    {
    if (_root.playVideo)
    {
    endVideo();
    }
    else
    {
    _root.goMenu = 0;
    reposition(_root.setMenuPosition);
    } // end if
    }
    else
    {
    _root.goMenu = 1;
    reset();
    } // end if
    } // end if
    } // End of the function
    stop();
    _root.cycle = 130;
    introSound = new Sound(main);
    introSound.attachSound("intro");
    introSound.start();
    rain = new Sound(ambient);
    rain.attachSound("rain");
    rain.start();
    rain.setVolume(100);
    introSound.onSoundComplete = function ()
    {
    introSound.start();
    };
    easeSpeed = 3;
    _root.oX;
    (_root.oY = 0);
    _root.oX = _xmouse;
    _root.oY = _ymouse;
    _root.posY = menu1._y;
    _root.menuPause = 0;
    menu1._alpha = menu2._alpha = menu3._alpha = menu4._alpha = menu5._alpha = 35;
    _root.diffX;
    _root.diffY;
    _root.mainScale = 70;
    scaleArray = new Array(70, 65, 60, 55, 50);
    alphaArray = new Array(100, 80, 65, 55, 45);
    setPositionX = new Array([0, 0], [100, 205], [100, 205]);
    fixArray = new Array([menu1._x, menu1._y], [menu2._x, menu2._y], [menu3._x, menu3._y], [menu4._x, menu4._y], [menu5._x, menu5._y]);
    startArray = new Array([menu1._x, menu1._y], [menu2._x, menu2._y], [menu3._x, menu3._y], [menu4._x, menu4._y], [menu5._x, menu5._y]);
    position1Array = new Array([position1_1._x, position1_1._y], [position1_2._x, position1_2._y], [position1_3._x, position1_3._y], [position1_4._x, position1_4._y], [position1_5._x, position1_5._y]);
    position2Array = new Array([position2_1._x, position2_1._y], [position2_2._x, position2_2._y], [position2_3._x, position2_3._y], [position2_4._x, position2_4._y], [position2_5._x, position2_5._y]);
    formationArray = new Array(position1Array, position2Array);
    xCenter = 290;
    yCenter = 150;
    menu1.xMove = menu2.xMove = menu3.xMove = menu4.xMove = menu5.xMove = 250;
    menu1.killGrid = menu2.killGrid = menu3.killGrid = menu4.killGrid = menu5.killGrid = 0;
    menu1.goPress = menu2.goPress = menu3.goPress = menu4.goPress = menu5.goPress = 0;
    menu1.videoPlay = menu2.videoPlay = menu3.videoPlay = menu4.videoPlay = menu5.videoPlay = 0;
    var useArray;
    xCenter = 290;
    yCenter = 150;
    _root.goMenu = 0;
    _root.setMenuPosition = 2;
    menuLeft = new Array(0, 40, 90, 140, 190);
    menuRight = new Array(0, -40, -90, -140, -190);
    menuSpeed = new Array(3, 5, 8, 15, 23);
    menu1.onEnterFrame = function ()
    {
    enterGrid(this, 1, 3, 3, 0, 0, 0.900000, 0.100000);
    };
    menu2.onEnterFrame = function ()
    {
    enterGrid(this, 2, 5, 5, 40, 0, 0.500000, 0.100000);
    };
    menu3.onEnterFrame = function ()
    {
    enterGrid(this, 3, 6, 6, 80, 0, 0.300000, 0.100000);
    };
    menu4.onEnterFrame = function ()
    {
    enterGrid(this, 4, 7, 7, 120, 0, 0.200000, 0.100000);
    };
    menu5.onEnterFrame = function ()
    {
    enterGrid(this, 5, 8, 8, 160, 0, 0.100000, 0.100000);
    };
    menu1.onRelease = function ()
    {
    getURL("eventi.htm", "frame");
    };
    menu2.onRelease = function ()
    {
    getURL("servizifuori.htm", "frame");
    };
    menu3.onRelease = function ()
    {
    getURL("broadcast.htm", "frame");
    };
    menu4.onRelease = function ()
    {
    getURL("evidenza.htm", "frame");
    };
    menu5.onRelease = function ()
    {
    getURL("corti.htm", "frame");
    };
    menu1.onRollOver = function ()
    {
    hilightMenu(this, 0, 1);
    };
    menu2.onRollOver = function ()
    {
    hilightMenu(this, 0, 2);
    };
    menu3.onRollOver = function ()
    {
    hilightMenu(this, 0, 3);
    };
    menu4.onRollOver = function ()
    {
    hilightMenu(this, 0, 4);
    };
    menu5.onRollOver = function ()
    {
    hilightMenu(this, 0, 5);
    };
    menu1.onRollOut = function ()
    {
    hilightMenu(this, 1, 1);
    };
    menu2.onRollOut = function ()
    {
    hilightMenu(this, 1, 2);
    };
    menu3.onRollOut = function ()
    {
    hilightMenu(this, 1, 3);
    };
    menu4.onRollOut = function ()
    {
    hilightMenu(this, 1, 4);
    };
    menu5.onRollOut = function ()
    {
    hilightMenu(this, 1, 5);
    };
    sectionsT = new Array("Università", "Servizi fuori", "Corti", "Eventi", "Info");
    _root.over = 0;
    stateArray = new Array("start", "stop");
    _root.pressed;
    _root.pressedSpeed;
    _root.pNum;
    init();



    Spero che tu possa darmi una mano

  5. #5
    Guest

    Predefinito

    CAZZ, potei metterlo tra i tag script!!

    Cmq, non avendo il file posso solo intuire cosa andare a toccare (non so neppure a cosa facciano riferimento tutte le variabili!).
    Prova a modificare, nell'ordine, i valori di queste variaibili:

    easeSpeed = 3;

    slider.xMove = -25;

    slider.xMove = -1475;


    Ciaooo!!!!

Regole di scrittura

  • Non puoi creare nuove discussioni
  • Non puoi rispondere ai messaggi
  • Non puoi inserire allegati.
  • Non puoi modificare i tuoi messaggi
  •