Right,

I have coded a button so that when it get's pressed it defines a variable and then an if function to tell me if it works?

PHP Code:
my_button.onPress = function() {
      
_root.clicked true;
}

if (
clicked == true;) {
      
trace("clicked is true");

But as soon as the movie is exported it gives me the trace without the button being pressed?