Skip navigation
Drail10
Currently Being Moderated

Having trouble with score in a game.

Dec 4, 2012 12:32 PM

as2.0 cs6 - - I have multiple instances of the same movie clip which are all named "up1, up2 etc." and an instance named gameScore that is set to 0 and will go up in *10 increments when an "up" instance is clicked.

 

My issue is that none of the clicks are being recognized. It worked when it was a single static movie clip. The instances are now moving classic tweens if that helps.

 

This is the code that I have so far and if anyone can help that would be great. Thanks.

 

edit: The "up" movie clips are all on different layers if that means anything.

 

var hello=0;

var ten=10;

gameScore.text= hello;

 

 

up.onRelease = function () {

          hello++;

          trace(hello);

          gameScore.text=hello*ten;

};

 

 

up1.onRelease = function () {

          hello++;

          trace(hello);

          gameScore.text=hello*ten;

};

 

 

up2.onRelease = function () {

          hello++;

          trace(hello);

          gameScore.text=hello*ten;

};

 

 

up3.onRelease = function () {

          hello++;

          trace(hello);

          gameScore.text=hello*ten;

};

 

 

up4.onRelease = function () {

          hello++;

          trace(hello);

          gameScore.text=hello*ten;

};

 

 

up5.onRelease = function () {

          hello++;

          trace(hello);

          gameScore.text=hello*ten;

};

 

 

up6.onRelease = function () {

          hello++;

          trace(hello);

          gameScore.text=hello*ten;

};

 
Replies
  • kglad
    72,373 posts
    Jul 21, 2002
    Currently Being Moderated
    Dec 4, 2012 12:41 PM   in reply to Drail10

    do you see any of those trace outputs?  if not, flash is not recognizing your movieclip button names and that is often caused by using them in timeline tweens.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points