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);
}
}
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);
}
}
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
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
Se metto lo script in modalità normale continua a darmi un'errore di sintassi ma non capisco perchè!!
nel primo if mancano le parentesi
if ((this.hitTest(_root.bal)) && (_root.score>=5))
GRANDE GunraY :adhone:
Grazie mille