[Tweener] AS 3 If/Else issues with Tweener
Nathan Thompson
nathan.thompson at engagegroup.co.uk
Tue Nov 11 07:08:21 PST 2008
Hi all... Apologies up front.
New to email lists and Tweener and AS3 so am probably going to be a royal pain in the proverbial... Please let me know if this is not the way to do things.
I have the following AS
if (blue.x==166) {
blue.blue_BTN.addEventListener ('mouseUp', function() {
Tweener.addTween(blue, {x:638, time:1});
trace('this is 638')
});
}
else if (blue.x==638) {
blue.blue_BTN.addEventListener ('mouseUp', function() {
Tweener.addTween(blue, {x:166, time:0.5});
trace('this is 166')
});
}
What I am trying to do is click blue_BTN and it change position (this works). When that is done I want to be able to click on it again and restore its position (this doesn't work).
Is it an if/else thing or is there a tween function I am not implementing.
Thanks in advance if anyone can point me in the right direction.
Nathan
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.caurinauebi.com/pipermail/tweener-caurinauebi.com/attachments/20081111/dfff03bb/attachment.htm>
More information about the Tweener
mailing list