/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// buttonState is String, pressed is Boolean // String is "on" if pressed is true, otherwise it's "off" var buttonState:String = (pressed) ? "on" : "off" // pressed is true if buttonState string matches "on" otherwise it's false var pressed:Boolean = (buttonState=="on") ? true : false