Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
panos

Easing beyond destination value

Recommended Posts

Greetings,

I'm trying to make a moving slot game reel to bounce beyond the ending value and then stop to the destination y coordinate but the only thing i have found until know is based between the starting and ending values is there any way to do that?

Thank you in advance.

Link to comment
Share on other sites

yup, the Back ease will overshoot the target value

TweenLite.to(mc, 1, {x:100, ease:Back.easeOut});
//change how much it overshoots
TweenLite.to(mc, 1, {x:100, ease:Back.easeOut.congif(8)});

http://greensock.com/docs/#/HTML5/GSAP/Easing/Back/ (works the same in ActionScript as JavaScript)

Link to comment
Share on other sites

Thank toy very much that worked like a charm!!!!

I have another problem with my reel motion it shatters and the motion in general is not smooth im attaching the motion class.

Thank you big time!!!!!

 

AnimMain.txt

Link to comment
Share on other sites

Whoa, there's a whole lot of code in that class.

It's simply impossible for me to look at that code and start to understand where a problem might be :( 

 

If you have a question directly related to GSAP, please let us know.

Link to comment
Share on other sites

Well yes you have a point, i have two ways to do that with a full dynamic reel constructed at every move and another one with a pre-costructed reel.

The way i have concluded is the full dynamic, the loop is starting at spinReel() and looping with addNextSymbol() the problem is that the cpu is getting a bunch of load and the motion is not smooth. cleanStart() and completeReel() are used for the semi-dynamic way.

 

PS: im attaching a telemetry export to assist you thank you in advance.

 

https://www.dropbox.com/s/28b3wpx90wdi2li/SlotsMainTel.html?dl=0

Link to comment
Share on other sites

Thanks, but the telemetry report did not help me understand where the problem may be in your code. 

Unfortunately we don't have the resources to provide free code reviews and dive into performance optimizations for your production code.

 

 

If performance is an issue due to a rendering bottleneck, you may want to explore using a BlitMask.

 

http://greensock.com/blitmask

http://greensock.com/asdocs/com/greensock/BlitMask.html

http://www.snorkl.tv/2011/10/use-blitmasks-wrap-feature-for-easy-bitmap-scrolling-and-looping/

Link to comment
Share on other sites

Thank you for your quick response.

My company is willing to pay subscription fees but due to capital controls in my country that is unavailable for know.

I have tried the blitmask but it does not show anything im using this code within the class i have provided.

Thank you in advance.

 

PS: do you accept western union or any other means of payment that can overcome the capital control issue??

private var blitMask:BlitMask;

this.blitMask = new BlitMask(this,-89,-267,178,534,true);

this.blitMask.update();

TweenMax.to(this.reelInstances,0.5,{y:"+=178",ease:Back.easeIn.config(3),onStart:this.blitMask.enableBitmapMode,onComplete:this.addNextSymbol,onUpdate:this.blitMask.update});


if(this.movePlace == this.position){
   TweenLite.to(this.reelInstances,0.30,{y:"+=178",ease:Back.easeOut.config(3), onComplete:this.afterSpin,onUpdate:this.blitMask.update});
}
else{
   TweenLite.to(this.reelInstances,0.15,{y:"+=178",ease: Linear.easeNone, onComplete:this.addNextSymbol,onUpdate:this.blitMask.update});
}
Link to comment
Share on other sites

Sorry, I guess I wasn't clear in my previous posts, but the core issue here is that you keep providing code snippets that you expect me to read and find some sort of of problem with. That just isn't practical. 

 

Although I can not troubleshoot performance issues in your full production code for your slot machine, if there is something like a BlitMask that is not working, please just provide a super simple fla that clearly demonstrates the issue with well-commented code. 

 

Before you do that I would strongly suggest that you download the source files in the post here: http://www.snorkl.tv/2011/10/use-blitmasks-wrap-feature-for-easy-bitmap-scrolling-and-looping/ and experiment with the demos that work. 

 

Unfortunately if your country forbids you to do commerce with us, there really isn't anything I can recommend :|  However, I want to clarify that the memberships we sell are for premium plugins and special licenses, they don't include a higher level of support. I would offer to discuss our consulting fees in private but it now seems that isn't a feasible path. 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×