Wednesday, May 9, 2012

[Action Script] Changing a variable with onRollOver May,2012

Is it possible to change the value of a variable with an onRollOver function? If not, what would be the best way to go about doing it? The following (simplified) code is located on a frame.

Code: function onEnterFrame():Void {

        //creates variable with initial value of false
        var fireLit:Boolean = false;
        //for testing
        trace("fireLit is " + fireLit);

        //When mouse rolls over firestart mc I want fireLit to be false, but it's not changing!
        _root.firestart.onRollOver = function() {
                fireLit = true;
        }
}
Changing a variable with onRollOver

Related Post



0 comments: