hi. can someone please tell me why this is not working. this should be easy for anyone who actually knows a bit about anything ...![]()
i'm trying to make an mc 'pic' grow if clicked, attach a text box to it, and on a second click make it shrink again and unattach the text box. i've tried testing the mc's size with if-statements like so:
i've tried many variations of this code. sometimes i get the first if-statement to work, sometimes the second, but never both of them. this code does grow the 'pic' and attach the text box, but ignores the second if-statement. i've attached an example fla.Code:if (pic._xscale <= 50) { pic.onRelease = function() { myTween = new mx.transitions.Tween(pic, "_xscale", easeType, 50, 100, 7); myTween = new mx.transitions.Tween(pic, "_yscale", easeType, 50, 100, 7); attachMovie("textbox", "textbox", 100, {_x:300, _y:10}); }; } if (pic._xscale ==100) { pic.onRelease = function() { myTween = new mx.transitions.Tween(pic, "_xscale", easeType, 100, 50, 7); myTween = new mx.transitions.Tween(pic, "_yscale", easeType, 100, 50, 7); unloadMovie("textbox"); }; }
your help will be very much appreciated!




Reply With Quote