Visualizzazione dei risultati da 1 a 2 su 2

Discussione: scorrimento

  1. #1

    scorrimento

    Ciao a tutti, vorrei far scorrere la mia clip "gallery" sull'asse x usando solo due bottoni ad es. "su" e "giu"
    Ho applicato questa funzione
    _global.targetX = 65;
    _global.targetY = 730;
    initWindow();
    gallery.onEnterFrame = moveCamera;
    function initWindow() {
    var c = 0;
    for (i=1; i<7; i++) {
    myClip = _root.menuinfo["clip"+i];
    if (i%2>0) {
    myClip._x = c*-299;
    myClip._y = 0;
    c++;
    } else {
    myClip._x = _root.gallery["clip"+(i-1)]._y;
    myClip._y = 0;
    }
    }
    }
    function moveCamera() {
    friction = 0.15;
    distanceX = (targetX-this._x)*friction;
    distanceY = (targetY-this._y)*friction;
    this._x += distanceX;
    this._y += distanceY;
    }
    function updateTargets(x, y) {
    targetX = x;
    targetY = y;
    }
    button1_btn.onRelease = function() {
    updateTargets(108,150);
    };
    button2_btn.onRelease = function() {
    updateTargets(108, 638);
    };
    button3_btn.onRelease = function() {
    updateTargets(505, -1);
    };
    button4_btn.onRelease = function() {
    updateTargets(539, -1);
    };
    button5_btn.onRelease = function() {
    updateTargets(375, -1);
    };
    button6_btn.onRelease = function() {
    updateTargets(539, -1);
    };
    button7_btn.onRelease = function() {
    updateTargets(165.5, -1);
    };
    button8_btn.onRelease = function() {
    updateTargets(375, -1);
    };
    button9_btn.onRelease = function() {
    updateTargets(165.5, -1);
    };
    button10_btn.onRelease = function() {
    updateTargets(539, -1);
    };

    Come si vede chiaramente qui ho utilizzato 10 btn anziche 2, sapreste aiutarmi?
    Per rendervi più facili le idee vi indico un sito in cui è presente l'effetto che vorrei ottenere! grazie ciao
    http://www.karinabednorz.de/

  2. #2
    leggi qua e' quello che ti serve:

    http://flash-mx.html.it/guide/view_l...dguida=6&id=83


    -Nextart.it Graphic Solutions

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.