How Do We Expose Scoring?
Now that we have explored how we expose both vector and bitmap images we will look at how we can use a graph token to access a variable in our game that will print out to a score. This is the hardest section in this Quick Start considering that we will now learn how to expose a function that provides the dynamic textbox a variable to print out. Through this section you will learn a valuable aspect of UI and how easy it is to show your score or game time on screen for more engaged gameplay.
Steps for Exposing a Variable to Dynamic Text
Draw a Dynamic Textbox inside of our Flash canvas and typing in the word "TEST." We will also name the instance to "myTextbox" and click the Selectable Button to disable.
Access the Actions Window by either pressing F9 or going to Window -> Actions in the menu.
Considering this is the most basic form of Actionscript we can enter, we will house the script on the default layer as is and enter the following code to expose our parameter to a Scaleform function:
Now that we have exposed our parameter we can compile our GFx file through the exporter and enter the following adjustments to our UIElements file to expose the parameter to Flow Graph.