At 12/5/07 11:48 AM, Celtrum wrote:
How doyou make that when you press a button, a dynamic text displays a value of a varible? Such as lives
1. Make a button
2. Make a dynamic text with the var name of livesappear
3. Add this code to the main frame
var lives:Number = 5
4. Add this code to the button.
on (release) {
var livesappear:Number = lives
}
when you press a button, a vaible goes down, and the dynamic text displays the decresed varible.
on (press) {
var name -= number to go down by
}