Visualizzazione dei risultati da 1 a 3 su 3
  1. #1
    Utente di HTML.it L'avatar di romass
    Registrato dal
    Sep 2001
    Messaggi
    144

    azione get url oppure go to su bootone elastico

    Ciao a tutti, ho un problema con i pulsanti elastici:
    dove metto il comando ad esempio gotoAndPlay(); oppure il comando get url? Ho provato in vari modi, ma non funzionano.
    Il codice associato al mio pulsante trasformato in movie clip è:

    onClipEvent (load) {
    inity = _y;
    targety = inity;
    initx = _x;
    targetx = initx;
    elfactor = 0.75;
    speedfactor = 6;
    dragging = false;
    _root.createEmptyMovieClip("linea1", -100);
    swapDepths(1000);
    }
    onClipEvent (enterFrame) {
    _root.linea1.clear();
    _root.linea1.lineStyle(1, 0x009900, 100);
    _root.linea1.moveTo(targetx, targety);
    _root.linea1.lineTo(_x, _y);
    if (dragging) {
    _x = _root._xmouse;
    _y = _root._ymouse;
    } else {
    diffx = targetx-_x;
    diffy = targety-_y;
    oldx = _x;
    oldy = _y;
    _x += diffx/speedfactor+speedx*elfactor;
    _y += diffy/speedfactor+speedy*elfactor;
    speedx = _x-oldx;
    speedy = _y-oldy;
    }
    }
    on (press) {
    dragging = true;
    }
    on (release, releaseOutside) {
    dragging = false;
    }



    Potete postarmi il codice intero con le funzioni che mi servono?
    Grazie

  2. #2
    prova a crare una funzione per la tua MC ed usarla come pulsante..
    Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
    Mechanics & Expert Tuning Fix Z3 Roadster Community

  3. #3
    mi sembra di conoscerlo questo Codice

    codice:
    on (release, releaseOutside) { 
    dragging = false; 
    // io lo metterei qui 
    }

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 © 2024 vBulletin Solutions, Inc. All rights reserved.