Visualizzazione dei risultati da 1 a 4 su 4
  1. #1

    [MX 04 ] rotation attorno ad un centro

    Ciao a tutti,

    dovrei far ruotare attorno ad un centro da me stabilito un semicerchio tramite action script..
    mi potreste aiutare ??

    Perfavore

    mymc.Rotation();????


    Grazie mille

  2. #2
    Utente di HTML.it L'avatar di arn
    Registrato dal
    Jun 2002
    Messaggi
    420
    questo è quello che uso sui mc (come se fosse un bottone), vedi se riesci a riutilizzarlo....

    onClipEvent (load) {
    x = -_x;
    y = _y;
    }
    on (press) {
    ruota = setInterval(ruota, Math.round(1000/35));
    function ruota() {
    xmouse = _root._xmouse+x;
    ymouse = -_root._ymouse+y;
    tg = ymouse/xmouse;
    actg = -Math.atan(tg)*57.3+90;
    if (xmouse<0) {
    _rotation = actg-180;
    } else {
    _rotation = actg;
    }
    }


    }
    on (release, releaseOutside) {
    clearInterval(ruota);
    }
    La rapidità che è una virtù, genera un vizio che è la fretta !
    -------------------------
    Browser: Opera & Firefox

  3. #3
    non è che abbia capito molto da questo script....
    ad ogni modo ho provato ad usare:

    my_btn._rotation = 90



    e in effetti mi sposta il pulsante di 90°, il fatto è che dovrei creare un movimento graduale che mi faccia arrivare a 90°..


    Come posso fare?

  4. #4
    ho provato così con un mc e funziooona!


    inc=1
    fat=10
    max=600
    initX=-50

    mc.onEnterFrame=function(){
    if(this._x<= max){
    this._rotation+=inc*fat
    }else{
    this._x=initX
    }

    }
    però come faccio a dirgli che deve ruotare attorno a delle coordinate ben precise?


    grazie

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.