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

    clip che si sposta sull'asse x-y

    ho creato un clip che si sposta sull'asse x-y
    con questa azione:

    onClipEvent (enterFrame) {
    this._y=this._y + _root.speed;
    this._x=this._x + _root.speed;
    }
    }

    e sul frame del clip:
    _root.speed=2;

    ora vorrei che il clip arrivato ad una determinata cordinata x-y
    tornasse alle cordinate di partenza e (dopo una pausa) ripetesse il movimento

    grazie

  2. #2
    Utente di HTML.it L'avatar di eng
    Registrato dal
    Mar 2002
    Messaggi
    1,227
    prova:

    onClipEvent (load) {
    avanti=true;
    stop_avanti=100 // metti qui la coordinata massima
    stop_indietro=100 // metti qui la coordinata minima

    }
    onClipEvent (enterFrame) {
    if(this._x>=stop_avanti){
    avanti=false;
    }
    if(this._x<=stop_indietro){
    avanti=true;
    }

    if(avanti){
    this._y=this._y + _root.speed;
    this._x=this._x + _root.speed;
    } else{
    this._y=this._y - _root.speed;
    this._x=this._x - _root.speed;
    }

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.