Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Adobe Flash CS4 Code
Index -> General Discussion
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
wysper




PostPosted: Wed Apr 28, 2010 11:04 am   Post subject: Adobe Flash CS4 Code

I'm a little new to the website so im unsure if this is the proper place to post this..but i need help writing and understanding code for Adboe Flash CS4..so if some one knows the language, please help me.

I'm making a game where you feed a man a burger and he gets lbigger (its a cheesy game, but its for school Razz)
i have a timer everything works(kinda) but i need to know how to make a counter..something to let the people who play know how many burgers they've fed the man.
i made a dynamic text with three zeros and static text saying "Burgers Fed" but im unsure of the code i need to make it all work.

i havent the slightest how to post a file in this so i could show what i have done so far..so if someone could tell me how, that would also be very helpful, ty for your help Smile[/list]
Sponsor
Sponsor
Sponsor
sponsor
wysper




PostPosted: Wed Apr 28, 2010 11:06 am   Post subject: RE:Adobe Flash CS4 Code

OH!..i for got to put..i have a dragable burger, and it reacts to the man..he gets bigger when the burger is released over his body..so..that might help Very Happy
Insectoid




PostPosted: Wed Apr 28, 2010 11:10 am   Post subject: RE:Adobe Flash CS4 Code

In the most brutal pseudo-code possible;

code:

var counter = 0
if (burger_released) {
    counter ++
}

//and then in your update loop or whatever
dynamic_text_box.text = counter


I haven't used flash in a while, and I've never used CS4, so I don't know if it's changed since, but that should work with tweaking (replacing conditionals and variable names with actual code).
wysper




PostPosted: Wed Apr 28, 2010 11:20 am   Post subject: RE:Adobe Flash CS4 Code

i'll try that next period..thanx Very Happy

would i be applying that to the frame, or a specific object?
Insectoid




PostPosted: Wed Apr 28, 2010 2:43 pm   Post subject: RE:Adobe Flash CS4 Code

This would be in the document class, though it could be implemented on the burger.
wysper




PostPosted: Thu Apr 29, 2010 11:59 am   Post subject: RE:Adobe Flash CS4 Code

I GOT IT..kinda..lol Razz

it works on a test..but the actual counter doesnt move..the output table shows counting..but the dynamic text box just..chills there :/
Insectoid




PostPosted: Thu Apr 29, 2010 3:05 pm   Post subject: RE:Adobe Flash CS4 Code

Then you aren't telling it what to do properly. Or flash is just being stupid and you should switch to a language that isn't being phased out.
Display posts from previous:   
   Index -> General Discussion
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: