Be a Supporter!

Script Infunctionality?

  • 537 Views
  • 6 Replies
New Topic Respond to this Topic
Flaedo
Flaedo
  • Member since: Feb. 14, 2005
  • Offline.
Forum Stats
Member
Level 09
Blank Slate
Script Infunctionality? 2006-07-25 06:41:13 Reply

onClipEvent(enterFrame){
if(hitTest(_root.object1)) gotoAndPlay(2);
}

Alright, this is my script. It is supposed to, when you touch the invisible block, jump foreward to the second frame, and play the rest of the animation (The main character falling to a gorey death).

For some reason, I can pass through the block as if no code is in there. I ran a couple

if(hitTest(_root.object1)) trace(xx);
}

tests, and the script works then.

Helpage?

Edvin
Edvin
  • Member since: Feb. 3, 2004
  • Offline.
Forum Stats
Member
Level 12
Blank Slate
Response to Script Infunctionality? 2006-07-25 06:47:23 Reply

Try this:

onClipEvent(enterFrame){
if(this.hitTest(_root.object1)){
gotoAndPlay(2);
}
}

Flaedo
Flaedo
  • Member since: Feb. 14, 2005
  • Offline.
Forum Stats
Member
Level 09
Blank Slate
Response to Script Infunctionality? 2006-07-25 06:57:34 Reply

Nope, that didn't work. Nice try, though.

Veng3ance
Veng3ance
  • Member since: Jan. 11, 2006
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to Script Infunctionality? 2006-07-25 07:03:30 Reply

change the gotoAndPlay(2) to gotoAndStop(2);

Flaedo
Flaedo
  • Member since: Feb. 14, 2005
  • Offline.
Forum Stats
Member
Level 09
Blank Slate
Response to Script Infunctionality? 2006-07-25 07:06:08 Reply

Man, this think just does NOT WANT TO WORK.

Fat-Lifeguard
Fat-Lifeguard
  • Member since: Jul. 23, 2006
  • Offline.
Forum Stats
Member
Level 16
Blank Slate
Response to Script Infunctionality? 2006-07-25 09:07:44 Reply

Have you tried

this.gotoAndPlay(2);

?

WolfAkela
WolfAkela
  • Member since: Dec. 19, 2005
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Response to Script Infunctionality? 2006-07-25 09:57:34 Reply

Yeah, this.gotoAndPlay(2).