Forum Topic: anothe OR problem

(255 views • 11 replies)

This topic is 1 page long.

<< < > >>
Questioning

floony

Reply To Post Reply & Quote

Posted at: 8/10/06 11:21 PM

floony NEUTRAL LEVEL 07

Sign-Up: 01/23/05

Posts: 270

onClipEvent (enterFrame) {
if (this.hitTest(_root.game.bg.clif1) || (this.hitTest(_root.game.bg.clif2) || (this.hitTest(_root.game.bg.clif3 || (this.hitTest(_root.game.bg.clif4) || (this.hitTest(_root.game.bg.clif5 || (this.hitTest(_root.game.bg.clif6) || (this.hitTest(_root.game.bg.clif7 || (this.hitTest(_root.game.bg.clif8) || (this.hitTest(_root.game.bg.clif9 || (this.hitTest(_root.game.bg.clif10) || (this.hitTest(_root.game.bg.clif11 || (this.hitTest(_root.game.bg.clif12) || (this.hitTest(_root.game.bg.clif13 || (this.hitTest(_root.game.bg.clif14) || (this.hitTest(_root.game.bg.clif15 || (this.hitTest(_root.game.bg.clif16) || (this.hitTest(_root.game.bg.clif17))))))))
))))))))))))))))) {
_root.game.player.gotoAndPlay("fall");
}
}

ok. whats wrong with this action script?

PLEASE IGNORE MY USERNAME. If I knew what it was going to mean in a few years. I JUST MADE UP A RANDOM WORD FOR GODS SAKE!!!.......................this sucks.


connemaraproductions FAB LEVEL 21

Sign-Up: 05/26/06

Posts: 1,751

hey anyone! i need help with my flash movie! if anyone is willing to help send a mail to my Newgrounds account! Thank you!


None

DonutMaster

Reply To Post Reply & Quote

Posted at: 8/10/06 11:26 PM

DonutMaster LIGHT LEVEL 29

Sign-Up: 05/15/05

Posts: 504

At 8/10/06 11:21 PM, floony wrote: onClipEvent (enterFrame) {
if (this.hitTest(_root.game.bg.clif1) || (this.hitTest(_root.game.bg.clif2) || (this.hitTest(_root.game.bg.clif3 || (this.hitTest(_root.game.bg.clif4) || (this.hitTest(_root.game.bg.clif5 || (this.hitTest(_root.game.bg.clif6) || (this.hitTest(_root.game.bg.clif7 || (this.hitTest(_root.game.bg.clif8) || (this.hitTest(_root.game.bg.clif9 || (this.hitTest(_root.game.bg.clif10) || (this.hitTest(_root.game.bg.clif11 || (this.hitTest(_root.game.bg.clif12) || (this.hitTest(_root.game.bg.clif13 || (this.hitTest(_root.game.bg.clif14) || (this.hitTest(_root.game.bg.clif15 || (this.hitTest(_root.game.bg.clif16) || (this.hitTest(_root.game.bg.clif17))))))))
))))))))))))))))) {
_root.game.player.gotoAndPlay("fall");
}
}

ok. whats wrong with this action script?

Wow, thats alot of hitTests. Anyway, what do you mean whats wrong with it? Is it not doing what you want it to do (and what exactly do you want it to do?)

Btw, connemaraproductions, get out of other peoples topics. Make one topic of your own, and wait for a reply.

BBS Signature

None

floony

Reply To Post Reply & Quote

Posted at: 8/10/06 11:37 PM

floony NEUTRAL LEVEL 07

Sign-Up: 01/23/05

Posts: 270

Wow, thats alot of hitTests. Anyway, what do you mean whats wrong with it? Is it not doing what you want it to do (and what exactly do you want it to do?)

The problem is that action script doesn't work.

what I want it to do is have _root.game.player, go to and play the frame "fall".

PLEASE IGNORE MY USERNAME. If I knew what it was going to mean in a few years. I JUST MADE UP A RANDOM WORD FOR GODS SAKE!!!.......................this sucks.


None

blanblan

Reply To Post Reply & Quote

Posted at: 8/10/06 11:38 PM

blanblan LIGHT LEVEL 16

Sign-Up: 01/21/06

Posts: 2,680

At 8/10/06 11:22 PM, connemaraproductions wrote: hey anyone! i need help with my flash movie! if anyone is willing to help send a mail to my Newgrounds account! Thank you!

Stop spamming everyone's threads. I've seen you ask this question in more than one thread. STOP IT. Please.

And make your own thread.


None

floony

Reply To Post Reply & Quote

Posted at: 8/10/06 11:42 PM

floony NEUTRAL LEVEL 07

Sign-Up: 01/23/05

Posts: 270

At 8/10/06 11:22 PM, connemaraproductions wrote: hey anyone! i need help with my flash movie! if anyone is willing to help send a mail to my Newgrounds account! Thank you!

... uhh, yea, thanks. that helped alot.

PLEASE IGNORE MY USERNAME. If I knew what it was going to mean in a few years. I JUST MADE UP A RANDOM WORD FOR GODS SAKE!!!.......................this sucks.


None

DonutMaster

Reply To Post Reply & Quote

Posted at: 8/10/06 11:43 PM

DonutMaster LIGHT LEVEL 29

Sign-Up: 05/15/05

Posts: 504

At 8/10/06 11:37 PM, floony wrote: The problem is that action script doesn't work.

what I want it to do is have _root.game.player, go to and play the frame "fall".

Well that was helpful! </sarcasm>

I guess its my fault, what I really meant was, do none of those hitTests work? Or do some work, and some don't?

Also, is he not going to that fall frame at all, or is going to the wrong frame, or is it not stoping at that frame?

BBS Signature

None

Johnny

Reply To Post Reply & Quote

Posted at: 8/10/06 11:49 PM

Johnny DARK LEVEL 20

Sign-Up: 04/17/04

Posts: 3,698

if I were to guess, I'd say that there is something wrong with the scope of..

_root.game.player.gotoAndPlay("fall");

Depending on where that actual code is located, you might not have to go all the way back to root to reference it. Also, instead of having 800 OR statements, you can run a loop and check, like so.

make a variabled named numberOfPlatforms and set it to how many you have in total, then run this code.

onClipEvent(enterFrame){
for(i = 0; i < numberOfPlatforms; i++){
if(this.hitTest(_root["clif"+i]){
//play code
}
}
}


None

floony

Reply To Post Reply & Quote

Posted at: 8/10/06 11:53 PM

floony NEUTRAL LEVEL 07

Sign-Up: 01/23/05

Posts: 270

some work. yes it goes to the write frame

PLEASE IGNORE MY USERNAME. If I knew what it was going to mean in a few years. I JUST MADE UP A RANDOM WORD FOR GODS SAKE!!!.......................this sucks.


None

DonutMaster

Reply To Post Reply & Quote

Posted at: 8/10/06 11:55 PM

DonutMaster LIGHT LEVEL 29

Sign-Up: 05/15/05

Posts: 504

Ok, first, look at what Johnny_Krysys posted, cuz thats a lot better way of doing something like this.

onClipEvent (enterFrame) {
if (this.hitTest(_root.game.bg.clif1) || (this.hitTest(_root.game.bg.clif2) || (this.hitTest(_root.game.bg.clif3) || (this.hitTest(_root.game.bg.clif4) || (this.hitTest(_root.game.bg.clif5) || (this.hitTest(_root.game.bg.clif6) || (this.hitTest(_root.game.bg.clif7) || (this.hitTest(_root.game.bg.clif8) || (this.hitTest(_root.game.bg.clif9) || (this.hitTest(_root.game.bg.clif10) || (this.hitTest(_root.game.bg.clif11) || (this.hitTest(_root.game.bg.clif12) || (this.hitTest(_root.game.bg.clif13) || (this.hitTest(_root.game.bg.clif14) || (this.hitTest(_root.game.bg.clif15) || (this.hitTest(_root.game.bg.clif16) || (this.hitTest(_root.game.bg.clif17))))))))
)))))))))) {
_root.game.player.gotoAndStop("fall");
}
}

^I really have no idea if that will change anything, all I did was rearrange some things.

BBS Signature

None

Snubby

Reply To Post Reply & Quote

Posted at: 8/10/06 11:56 PM

Snubby FAB LEVEL 20

Sign-Up: 12/04/04

Posts: 3,145

sure are a lot of closing brackets, too many i think...


None

Johnny

Reply To Post Reply & Quote

Posted at: 8/11/06 01:40 AM

Johnny DARK LEVEL 20

Sign-Up: 04/17/04

Posts: 3,698

At 8/10/06 11:53 PM, floony wrote: some work. yes it goes to the write frame

Some actually work? I would think that's an instance name problem if some work, and others don't.


All times are Eastern Standard Time (GMT -5) | Current Time: 09:06 AM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!