View Poll Results: How to get upgrades menu working
- Voters
- 1. You may not vote on this poll
-
Upgrades menu
-
text box funtions
-
number functions
-
functions with numbers
-
How to make my upgrades menu work
Hi all
i have a flash game that i am creating but the upgrades menu doesnt want to work, i have a text box that i use for my coding so that if the text box is showing a certain number something happens (I.E A function happens), but i cant seem to get this working here is my code:
time.onEnterFrame = function() {
if(_root.cash <= 99) {
_root.count = 1;
}
}
time.onEnterFrame = function() {
if(_root.cash >= 100) {
_root.count = 2;
}
}
time.onEnterFrame = function() {
if(_root.cash <= 149) {
_root.count = 3;
}
}
I am using A.S 2.0 on this and i have two text boxes working on this, the first the cash text box and this goes up every time the player kills an enemy, and the second text box is a the count text box which should go up when the cash equals a certain amount how can i get this to do it? please help
-
AS2 Code
Actionscript Code:
time.onEnterFrame = function () { if (_root.cash.text<=99) { _root.count.text = 1; } if (_root.cash.text>99 && _root.cash.text<=100) { _root.count.text = 2; } if (_root.cash.text>100 && _root.cash.text<=149) { _root.count.text = 3; } };
Last edited by poltuda; 09-27-2010 at 02:49 PM.
-
That doesnt work? :S Nothing happens, when the text boxes reach a certain number they have to run a function how would you get that to work?
E.G
time.onEnterFrame = function () {
if (_root.cash<=99) {
math99;
}
};
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|