Visualizzazione dei risultati da 1 a 6 su 6
  1. #1
    Utente di HTML.it
    Registrato dal
    Jul 2000
    Messaggi
    48

    Urgente! cos'è che non va' ?

    Cosa ha questo script che non va'?
    onClipEvent (enterFrame) {
    if (this.hitTest(_root.bal)) & (_root.score>=5)
    {
    removeMovieClip(_root.bal);
    gotoAndPlay(6);
    }
    if (this.hitTest(_root.bal))
    {
    removeMovieClip(_root.bal);
    gotoAndPlay(4);
    }
    }

  2. #2
    Utente di HTML.it L'avatar di Nuke
    Registrato dal
    Feb 2001
    Messaggi
    633
    l'unica cosa che vedo strana è che manca l'else..

    onClipEvent (enterFrame) {
    if (this.hitTest(_root.bal)) & (_root.score>=5)
    {
    removeMovieClip(_root.bal);
    gotoAndPlay(6);
    }
    else if (this.hitTest(_root.bal))
    {
    removeMovieClip(_root.bal);
    gotoAndPlay(4);
    }
    }
    Finding the answers comes knowledge knowing what the answers mean comes wisdom - http://www.catb.org/hacker-emblem/hacker.png

  3. #3
    Utente di HTML.it L'avatar di Nuke
    Registrato dal
    Feb 2001
    Messaggi
    633
    ho dimenticato.. anche l'AND logico forse non va bene.. mi pare si scriva con due &&

    onClipEvent (enterFrame) {
    if (this.hitTest(_root.bal)) && (_root.score>=5)
    {
    removeMovieClip(_root.bal);
    gotoAndPlay(6);
    }
    else if (this.hitTest(_root.bal))
    {
    removeMovieClip(_root.bal);
    gotoAndPlay(4);
    }
    }
    Finding the answers comes knowledge knowing what the answers mean comes wisdom - http://www.catb.org/hacker-emblem/hacker.png

  4. #4
    Utente di HTML.it
    Registrato dal
    Jul 2000
    Messaggi
    48
    Se metto lo script in modalità normale continua a darmi un'errore di sintassi ma non capisco perchè!!

  5. #5
    Utente di HTML.it
    Registrato dal
    Jun 2002
    Messaggi
    795
    nel primo if mancano le parentesi
    if ((this.hitTest(_root.bal)) && (_root.score>=5))

  6. #6
    Utente di HTML.it
    Registrato dal
    Jul 2000
    Messaggi
    48
    GRANDE GunraY :adhone:
    Grazie mille

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.