Jump to content
Search Community

retropunk last won the day on April 16 2015

retropunk had the most liked content!

retropunk

Members
  • Posts

    181
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by retropunk

  1. an update here, I moved my listeners and rollover, rollout functions out of a function and now they work fine. Another reason not to have nested functions.
  2. Yes, since working with AS3 I've been keeping with that best practice of removing listeners. Thanks Jack
  3. so would you say that the preferred practice is to always just remove listeners yourself? From what I understand in other languages you need to keep track of memory management yourself. Flash is unique in that it has a Garbage Collector doing it for you.
  4. interesting, I haven't had much experience with the weak reference. I'm gonna do some hard core testing and see what comes back. I'll repost with my results, they could prove helpful. I've read and seen tutorials that say you should ALWAYS do false, 0, true for the 3rd, 4th and 5th parameters in an addEventListener. Especially the weak reference, it should ALWAYS be set to true. Maybe its not so black and white? stay tuned.
  5. Hi everyone, pardon my code but I'm just starting out with these classes and I wanted to get feedback on these button functions. What I notice is that if I rollover and out too quickly eventually the animation just hangs. I'm thinking I'm using these wrong and there is a better way to interrupt the animations? I am still learning so be gentle... thanks guys! - btw the tint vaules are defined somewhere else in the code. //button functions for the Click Button gameResults.clickMeBtn.addEventListener (MouseEvent.ROLL_OVER, rollover, false, 0, true); gameResults.clickMeBtn.addEventListener (MouseEvent.ROLL_OUT, rollout, false, 0, true); gameResults.clickMeBtn.buttonMode=true; function rollover (event:MouseEvent):void { TweenLite.to(gameResults.clickMeBtn.theBackground, .5, {tint:buttonColor}); TweenLite.to(gameResults.clickMeBtn.theOutline, .5, {tint:bgColor}); } function rollout (event:MouseEvent):void { TweenLite.to(gameResults.clickMeBtn.theBackground, .5, {tint:bgColor}); TweenLite.to(gameResults.clickMeBtn.theOutline, .5, {tint:buttonColor}); }
  6. wow! that was simply awesome. I have tears in my eyes right now! Thanks a million! I appreciate the tips on my coding. I still have much to learn. I've been coasting too long on AS2 and its been to daunting taking on AS3 on my own. I can honestly say that after finding your classes I have a new found love for Flash again. It reminds me of when I first found Flash back in the 3.0 days! They just introduced alpha and I was never so excited. Thanks for making it fun again. - Patrick
  7. This isn't exactly what you need but it might help you with the overall theory. http://gotoandlearn.com/play?id=96
  8. Hello everyone, I'm new here and somewhat new to AS3 so I apologize for any newbie questions. First off I want to applaud Greensock for this effort. I couldn't sign up fast enough! Some of the best code I've come across and for $99! Amazing work! I'm making a small Wheel of Fortune type game and I am using the rotate and blur tweens and they work great. The problem I am having is that when I rotate the wheel several times and then slow it down over time I can't get it to stop smoothly when it gets near the predetermined position. It stops on the right marks but it will jump abruptly at times. I tried using short rotation but I think I might be implementing it wrong. I'm attaching the fla. I have code on the timeline so please don't bash me. When you click the button to spin the wheel watch how it spins and blurs. Totally great but I'd like to have it stop a bit more gracefully. Thanks in advance for the help! - Patrick
×
×
  • Create New...