Pagina 1 di 5 1 2 3 ... ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 42

Discussione: bottoni elastici

  1. #1

    bottoni elastici

    ciao
    qualcuno mi saprebbe dire come si realizzano i bottoni elastici che si vedono in questo sito? http://www.nestmove.com/

  2. #2
    Una volta, per sbaglio, avevo creato un movimento elastico, ma non era fatto bene come questo...interessa anche a me...

  3. #3
    Forse non è la soluzione !!!

    Ma è un buon inizio, crea un quadrato (clip) e chiamalo mc e poi

    codice:
    inity = mc._y;
    targety = inity;
    initx = mc._x;
    targetx = initx;
    elfactor = 0.75;
    speedfactor = 3;
    dragging = false;
    maxX=initX+100
    maxY=initY+100
    minX=initX-100
    minY=initY-100
    
    mc.onEnterFrame=function() {
    
    if (dragging) {
    this._x = _root._xmouse;
    this._y = _root._ymouse;
    if(this._y>maxY or this._x>maxX){dragging=false}
    if(this._x<minX or this._y<minY){dragging=false}
    } else {
    diffx = targetx - this._x;
    diffy = targety - this._y;
    oldx = this._x;
    oldy = this._y;
    this._x += diffx / speedfactor + speedx * elfactor;
    this._y += diffy / speedfactor + speedy * elfactor;
    speedx = this._x - oldx;
    speedy = this._y - oldy;
    }
    
    }
    mc.onRollOver=function() {
    	 dragging = true;
    	 
    }
    mc.onRollOut=function(){
    dragging = false;
    }

  4. #4
    anzi mi correggo, forse è una delle soluzioni

    codice:
    inity = mc._y;
    targety = inity;
    initx = mc._x;
    targetx = initx;
    elfactor = 0.75;
    speedfactor = 3;
    dragging = false;
    maxX=initX+100
    maxY=initY+100
    minX=initX-100
    minY=initY-100
    
    mc.onEnterFrame=function() {
    
    if (dragging) {
    this._x = _root._xmouse;
    this._y = _root._ymouse;
    if(this._y>maxY or this._x>maxX){dragging=false;targety=inity }
    if(this._x<minX or this._y<minY){dragging=false;targetx=initx }
    } else {
    diffx = targetx - this._x;
    diffy = targety - this._y;
    oldx = this._x;
    oldy = this._y;
    this._x += diffx / speedfactor + speedx * elfactor;
    this._y += diffy / speedfactor + speedy * elfactor;
    speedx = this._x - oldx;
    speedy = this._y - oldy;
    }
    
    }
    mc.onRollOver=function() {
    	 dragging = true;
    	 
    }
    mc.onRollOut=function(){
    dragging = false;
    }

  5. #5

  6. #6
    Graaande Rempox
    Grazie!

  7. #7
    Utente di HTML.it
    Registrato dal
    Dec 2000
    residenza
    Savona
    Messaggi
    900
    Qui c'è l'originale per eccellenza, scaricato dal sito mjau-mjau:
    www.filelife.com/sticky.fla
    Ciao,
    dover

  8. #8

  9. #9

  10. #10
    Rempox,
    ho trasformato il mc "menu" in bottone per richiamare con il release una pagina web ma non mi funziona, non la apre Come mai?

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.