Hey guys,
First of all I’m new to this forum, and I’m glad to be here, I learned a lot from this site.
My problem:
I’m trying out this goed, it moves and scales an mc “test”.
As you can see the mc will disappear on the right side.
All this works succesful, only actionscript doesn’t meet the condition given in the “if” statement. Wich results in no trace.
What is the problem and how do I solve it?
function test() {
test.onEnterFrame = function() {
buttonspeed = 8;
buttonw = 0;
buttonh = 0;
with (test) {
buttonxpos = (Stage.width);
buttonypos = (Stage.height/2)-(_height/2);
_width += (buttonw-_width)/buttonspeed;
_height += (buttonh-_height)/buttonspeed;
_x += (buttonxpos-_x)/buttonspeed;
_y += (buttonypos-_y)/buttonspeed;
if (buttonw == _width) {
trace("test succesful");
delete test.onEnterFrame;
}
}
};
}