Hi,
Simple, for your coding practices as well do this,
remove the code off of the button , give the button an instance name of "button" no quotes.
and put this under your A and B variables on the timeline;
or if you want to do it the button method put this on the button itself and remove the if statement from the timelinePHP Code:var A:Number = 0;
var B:Number = 25;
button.onRelease = function()
{
_root.A += 5;
if (_root.A >= _root.B)
{
_root.A = _root.B;
}
};
PHP Code:on (release) {
_root.A += 5;
if (_root.A >= _root.B)
{
_root.A = _root.B;
}
}




Reply With Quote