Skip to main content
Inspiring
August 10, 2011
Question

point burst. An mc that appears in games when you click and +100 appears

  • August 10, 2011
  • 2 replies
  • 671 views

Maybe the title is not self explanatory but in most  iphone games eg you click the correct example and you see a +100 points mc appear and rise and alpha out. I did this with a png done in photoshop BUT not all goes well - it doesn't work.

public class ClickMain extends Sprite
    {
        private var pb100:Pb100 = new Pb100();

private function addPoints ():void
        {
            this.pointsI = this.pointsI + 10;
            this.score.score_txt.text = String(this.pointsI);
           
            pb100.x = currentBubble.x;
            pb100.y = currentBubble.y;
           
trace(currentBubble.x);
            addChild(pb100);

        }

It seens perfct but I can't see it work. The funny thing is that the custom currentBubble - with a dot after you see the code hints but a dot after pb100 - you see no code hints. Well not normal.

This topic has been closed for replies.

2 replies

Inspiring
September 2, 2011

OK - I reposted and the question was answered. The problem was that the animation was started and finished before it was added to the screen.

Inspiring
August 11, 2011

This is very strange - I have used the code in a new fla to test and it works perfectly therefore it is going to be difficult for any of you to answer me ie: the code is perfect so why can't I see it in my game.