Guest Posted December 22, 2011 Share Posted December 22, 2011 I have two buttons that perform the same function but only one is working. Here is the rundown. - ipadButton - Plays one of two frame labels based on a if statements inside "devicesText". This button works perfectly. - closeBTN - Plays the same frame labels based off the same if statements inside "devicesText", it is also nested inside "devicesText". This button only works if Button A hasn't played the frame labels and come to a stop();. It seems like the stop(); or tween kills the ability of the button to work. code: import com.greensock.*; import com.greensock.easing.*; ipadButton.onPress = function(){ if ((largeScreen._y == 234.95) && (smallScreen._y == 239.9)) { TweenLite.to(largeScreen, .5, {_x:20, _y:80}); TweenLite.to(smallScreen, .5, {_x:140, _y:86}); if (devicesText._currentFrame = 1) { devicesText.gotoAndPlay("deviceTXT"); } } } devicesText.closeBTN.onPress = function(){ trace ("button worked"); } Link to comment Share on other sites More sharing options...
Carl Posted December 23, 2011 Share Posted December 23, 2011 i wasn't able to open your file. i only have cs5. but from your code it seems that you may want to have == instead of = inside this condition: if (devicesText._currentFrame = 1) { devicesText.gotoAndPlay("deviceTXT"); } don't know if that is related to your problem or not. from your description it is unclear what Button A is. Link to comment Share on other sites More sharing options...
Guest Posted December 23, 2011 Share Posted December 23, 2011 I wish it was that easy, but the button works before the tween. I've attached a CS4 zip any help will be appreciated. Link to comment Share on other sites More sharing options...
Carl Posted December 23, 2011 Share Posted December 23, 2011 I couldn't find any tweening code at all in your file. your button isn't working because you are covering it with the shape you are using as a mask. remove the mask and it works. Please keep the questions you post here related to the GreenSock Tweening Platform. Thanks Carl Link to comment Share on other sites More sharing options...
Guest Posted December 23, 2011 Share Posted December 23, 2011 I AM using Tweenlite for this project, but removed that from the code since it wasn't the source of the conflict. I keep in mind next time to include the tweenlite code as to not upset any forum Nazis. I decide to import form the library and use tweenlite to position and tween it into position but thanks anyways. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now