Flash Games
 FAQ   Search   Memberlist   Usergroups   Register  Profile   Log in to check your private messages   Log in 


setting a minimum value for dynamic text



 

Post new topic   Reply to topic  
   DEVPPL Forum Index -> Flash Forum
View previous topic :: View next topic  
Author Message
Solar42693



Joined: 11 Jul 2006
Posts: 35

PostPosted: Wed Jul 26, 2006 9:14 pm    Post subject: setting a minimum value for dynamic text Reply with quote

could anyone please tell me how you would do this? it's for a game and i'm trying to make it where you buy stuff, and my gold just goes in the negatives. i tried a goldneeded>=goldrequired but it's not working. could someone plz help, thanks. also for dynamic text is it possible to do like... oh say a
Code:
if health <= 0
_root....
ok you get the point, but is it possible to have a movieclip go to a different frame when health is less than or equal to 0. because i couldn't get that to work either. thanks again
Back to top
View user's profile Send private message
Samuel Rounce
100+ Club


Joined: 30 Oct 2005
Posts: 116
Location: London, UK

PostPosted: Sun Aug 06, 2006 10:18 pm    Post subject: Re: setting a minimum value for dynamic text Reply with quote

Hmm well as I don't know the variable for the dynamic text field I'll have to assume a load of stuff but just post back and I'll be happy to straighten things out if you have any problems with the code.

Code:
//The health code
if(health <= 0) {
   health == 0;
   _root.healthpic_mc.gotoAndStop(0);
   //assuming the health empty picture is on frame 0 of it's movieclip
}


Code:
//The money code
if(goldamount - goldneeded <= 0) {
   textbox_var = "not enough gold";
} else {
   buyitem(itemname); /*I assume you've written a buy item function that has an argument that is set, so the correct item is added to your inventory*/
}
Back to top
View user's profile Send private message AIM Address MSN Messenger
Solar42693



Joined: 11 Jul 2006
Posts: 35

PostPosted: Mon Aug 07, 2006 1:35 am    Post subject: Re: setting a minimum value for dynamic text Reply with quote

That clears things up a lot, i'll have to go try that, thanks.
Back to top
View user's profile Send private message
Samuel Rounce
100+ Club


Joined: 30 Oct 2005
Posts: 116
Location: London, UK

PostPosted: Mon Aug 07, 2006 10:30 pm    Post subject: Re: setting a minimum value for dynamic text Reply with quote

If you need any help add me on MSN.
Back to top
View user's profile Send private message AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    DEVPPL Forum Index -> Flash Forum All times are GMT + 1 Hour
Page 1 of 1

 
 
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User: Pass:
Log me on automatically each visit:

 


Powered by phpBB © 2001, 2005 phpBB Group - Modified by DEVPPL

Flash Games - Sitemap