- [Instructor] In this course, we'll be working with variables and functions in Axure, and looking at how we can use them to make our prototypes more realistic and interactive. But before we can really get started using any of these things, we'll need to know where to find them. Axure's list of variables isn't visible anywhere on the main interface, it's a little bit hidden honestly, so let's go find it now. I'm going to drag a button out onto the canvas, just so we can get into the onclick event here. Here on the left we've got our list of actions. If we want to find our variables and functions, we'll need to pick an action that has some options for us.
Some of these actions don't have any options, like Close Window, there's nothing over here. But if we're using something like the Set Text action, then we'll have some options. I'll click on a widget, and then down here where it says Set Text To we've got a little fx button. That's our function button. I'm going to click it now, and then here I've got another link that says Insert Variable or Function. And this is where we'll finally find that list of variables in Axure. It's like a whole hidden toolbox here that Axure gives us to work with. Throughout this course we'll be working our way through this list and looking at different ways that we can use some of these properties and functions in our prototypes to make our prototypes more interactive.
I've also included a reference sheet in the exercise files, with an explanation of what each one of these variables is, so hopefully that will be helpful for you as well. Okay, so now that we've found our list of variables, let's go ahead and click one. I'll click on this Page Name variable. I still had some default text in there, so I'll just delete that. But you can see that when we insert our variables here, Axure gives us a pair of double square brackets. That's how Axure knows that we've got a variable or a function in here that it needs to evaluate. So any time we want to use any variable in Axure, whether we're picking it from the list or typing it straight in, we'll need to make sure it's wrapped in these double square brackets first.
Whatever is wrapped in the brackets, Axure will try to evaluate as a variable or an expression. So if we need to do some math, like adding some of our widget properties, (keys clicking) then everything that's inside these square brackets, Axure's going to evaluate for us and then give us back the result. So that's the basic idea of how we can start taking advantage of the variables and functions in Axure. Now that we know where to look for that list, we can start adding variables and expressions anywhere we see this function button.
- Using variables in Axure
- String methods in Axure
- Truncating text strings
- Formatting dates and times
- Setting up a looping animation
- Setting up a responsive background image
- Positioning widgets in the browser
- Repeater and item properties