Author |
Message |
wysper
![](http://compsci.ca/v3/uploads/user_avatars/19369395514bcdcf7107cbe.jpg)
|
Posted: 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 )
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 [/list] |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
wysper
![](http://compsci.ca/v3/uploads/user_avatars/19369395514bcdcf7107cbe.jpg)
|
Posted: 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 Very Happy](http://compsci.ca/v3/images/smiles/icon_biggrin.gif) |
|
|
|
|
![](images/spacer.gif) |
Insectoid
![](http://compsci.ca/v3/uploads/user_avatars/13760332514cbd0ce972eaa.jpg)
|
Posted: 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). |
|
|
|
|
![](images/spacer.gif) |
wysper
![](http://compsci.ca/v3/uploads/user_avatars/19369395514bcdcf7107cbe.jpg)
|
Posted: Wed Apr 28, 2010 11:20 am Post subject: RE:Adobe Flash CS4 Code |
|
|
i'll try that next period..thanx
would i be applying that to the frame, or a specific object? |
|
|
|
|
![](images/spacer.gif) |
Insectoid
![](http://compsci.ca/v3/uploads/user_avatars/13760332514cbd0ce972eaa.jpg)
|
Posted: 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. |
|
|
|
|
![](images/spacer.gif) |
wysper
![](http://compsci.ca/v3/uploads/user_avatars/19369395514bcdcf7107cbe.jpg)
|
Posted: Thu Apr 29, 2010 11:59 am Post subject: RE:Adobe Flash CS4 Code |
|
|
I GOT IT..kinda..lol
it works on a test..but the actual counter doesnt move..the output table shows counting..but the dynamic text box just..chills there :/ |
|
|
|
|
![](images/spacer.gif) |
Insectoid
![](http://compsci.ca/v3/uploads/user_avatars/13760332514cbd0ce972eaa.jpg)
|
Posted: 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. |
|
|
|
|
![](images/spacer.gif) |
|