Skip to main content
New Participant
May 1, 2015
Question

Why can't I call play(); in another class?

  • May 1, 2015
  • 1 reply
  • 360 views

So I have made a game, with a dinosaur, and when you bite into something I want there to be bloodsplatter. I've animated the bloodsplatter and the first image is the Class for it. But when I press space It wont change, I can only trace words in the splash function. The other images are snippets from the dinosaur class. Help is very much appreciated, because I am quite new to AS3.

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
May 1, 2015

that will cause the your blood instance to play.  if that's what you want, use the trace function to confirm that if-branch is executing and splash() is executing.

p.s. your not following naming convention which will cause more and more problems if you ever work with anyone else or continue to seek help from others.

your class name should be BloodClass and your instance blood.  you have just the opposite.

JejkobbAuthor
New Participant
May 1, 2015

when I put a trace in splash() it works, but it wont play when I put play(); there

why is that?

JejkobbAuthor
New Participant
May 1, 2015

what's the trace show?


[object blood]