User Interaction With Dynamic Text Fields
Hello Everyone,
This is my first post here. I am working on a simple math game, where the player will be given a series of numbers and three possible answers(the total of all the numbers). The player will drag the selected answer into the "slot" so to speak.
My question is, what would be the best way to handle the numbers. For the main numbers(the ones that will be added together) I am just using dynamic text fields, which display random numbers. I initially was going to follow this same method for the answers as well. But, the answers need to have drag and drop functionality. And, being a dynamic text field, I though there may be some issues.
For example, dynamic text often conflicts with a button, making the mouse cursor flicker and such. My idea is to design little tile graphics which the numbers sit on top of. With the numbers that will be added together, there really is no issue, as there is no user interaction. But, the answer tile will be moved around.
Is there a way to avoid the cursor issue with dynamic text? Or, would there be a different way to display random numbers without using a dynamic text field?
I am currently compiling the random numbers like so:
var numOne:Number = Math.floor(Math.random() * 10 + 1);
This gives me a random number between 1 and 10 and is repeated for each number needed.
I then total these numbers by simply creating another variable:
var total:Number = numOne + numTwo . . . ;
From there, I have dynamic text fields on the stage to display the numbers above.
firstNum.text = String (numOne); and so on.
This all works fine for the numbers that will not involve any interaction. But, I foresee issues using a dynamic text field meant to be dragged and dropped.
So, what I want is a randomly generated number that can be dragged and dropped, while avoiding the cursor flicker produced by a dynamic text field. Any insight would be much appreciated.
JL
|