We have already discussed about what are the different components in the number bricks in one of our previous post Number bricks by Appmaker for Firefox OS. We very well know that all the 3 bricks are depends on various other bricks to do action. We will use some basic bricks along with this to show the demo.We will be using following components
- Header
- Counter
- Daily Counter
- Random Number Generator
- Text box
- Button
Header
We will be placing it at the top and it is first brick. We will be using it for giving the name for the application. Even though it is given in project area it is always nice to give here for one page applications. It is static content as of now.
Counter
Here it is used to get the values from 0 to 3. We will get the output from this whenever it gets incremented. And send to a boolean gate checker.
Boolean Gate
We will get the value from the counter and check whether it is 3. If it is equal to 3 we will reset the counter. And depending on the boolean true or false we will send to two different counters.
Daily Counter
We will get some period signals for this between some period of time. In our application it will be coming when the value is true from Boolean Gate and we will send the text value from here.
Random Number Generator
We will get random numbers from here. We have made to create some random number between 0 and 20. In our application it will be coming when the value is false from Boolean Gate and we will send the text value from here.
Text box
As we mentioned above we will get the input from Daily counter and Random Number Generator.
Button
Whenever we click the Counter gets activated.
The follow of the application is as follows.
We will click the button.
The button will send input to Counter.
Counter will send the number to Boolean Gate, which is checked whether it is 3 or not.
If it is equal to 3 then Daily counter is activated and number is generated and sent to Text box.
If it is false a random number will be generated sent to Text box.
Feel free to run the application in browser
You can also try to remix it and change according to your need.
Number bricks by Appmaker for Firefox OS.
Number bricks by Appmaker for Firefox OS.