-
Till Management System
Hello.
I am making a till management system for a coffee shop. I have the different types of products on different frames. I am trying to work out a way to be able to press the buttons for each individual product, and have this add the cost to a virtual cart, i.e. a coffee for £1.
I have tried to use the actionscript cost = 0, and the buttons will have on(release) } cost+=1 cost.text = cost
----------
While this works adding the costs on that one frame, the actionscript cost=0 does not update on the next frame to show the current cart amount, which has the next set of products and I therefore have no idea how I would keep the current cost of the basket into the next frames and then to the checkout using the current actioncript.
Any help would be appreciated.
Using CS4 Professional Actionscript 2
-
Welcome ConnorA
You have to modify the frame structure of your application.
PHP Code:
_global.cost=0;
This might help..
arkitx
-
-
Hello, I have added the _global.cost to an actionscript layer on this scene. Whenever I press the buttons now it will just display the number 0 regardless of how many times I press the button.
The actionscript I am using for the buttons are:
on(release) {
cost.text=cost ;
cost+1 ;
}
Any further help would be appreciated.
-
Hi,
Try
PHP Code:
on (release) {
cost++;
//cost += 1;// or this way
txt.text = cost;
}
give your text a different name, it seems to clash with variable cost, or change the variable name!!
-
Brilliant, that did it. Thanks!