Be a Supporter!

Achievment principles?

  • 142 Views
  • 2 Replies
New Topic Respond to this Topic
Havegum
Havegum
  • Member since: Oct. 20, 2008
  • Offline.
Forum Stats
Supporter
Level 24
Melancholy
Achievment principles? 2009-10-05 14:40:32 Reply

So i made this test:
http://spamtheweb.com/ul/upload/051009/7 4121_AchievmentTest.php

what was supposed to happen is that when you press one button, an achievement thingy should pop up at the bottom left corner. When you press it quickly, the achievment thingys should appear on top of each other..

what happens is that when i press one button, the achievment text changes on all.. and when you press more than once quickly, the achievments ignore _y = 400 and appear at _y = 0...

var i:Number = 1;
var showingAc:Number = 0;
stop();

showAchievment = function (achievment) {
	_root.attachMovie("AcMc",AcMc+_root.i,_root.i);
	_root[AcMc+_root.i]._y = 400;
	_root[AcMc+_root.i]._y -= 45*_root.showingAc;
	_root[AcMc+_root.i].AcTxt = achievment;
	_root.i++;
};

this.button.onPress = function() {
	_root.showAchievment("Presser");
};
this.button2.onPress = function() {
	_root.showAchievment("Presser2");
};

BBS Signature
Doomsday-One
Doomsday-One
  • Member since: Oct. 28, 2005
  • Offline.
Forum Stats
Member
Level 10
Programmer
Response to Achievment principles? 2009-10-05 15:14:01 Reply

AcMc+_root.i should read "AcMc"+_root.i. The AcMc bit should be in quotation marks each time.


Doomsday-One, working on stuff better than preloaders. Marginally.

Havegum
Havegum
  • Member since: Oct. 20, 2008
  • Offline.
Forum Stats
Supporter
Level 24
Melancholy
Response to Achievment principles? 2009-10-05 15:52:10 Reply

Thank you VERY much!


BBS Signature