Search the Community
Showing results for tags 'Timer'.
-
Hello to the community I'm trying to create a countdown with a special design and to animate like slots numbers do: with mask and rolling from top to bottom. Is there something similar? Any clues? I found this https://codepen.io/creativeocean/pen/pWXgNG but it's not what I need. I need from 300.000 to 0, different speeds, and this kind of animation: Any advices or help on this? The speed and the number to start from and go to, will change every 5 minutes. Thanks!
-
I'm building a Pomodoro Timer and want to create a draggable div (assigned with a background-image of a 25 minute timescale) to set a timer and on release the div/image will animate back to the starting position. Can I do this with GSAP? Here's my Codepen: https://codepen.io/iamryandnelson/pen/dRbKMM
-
Hi I'm working on a small game (as3) and I'm trying to optimize performance. Instead of calling a method for hitTest every frame I want to call them 5 times per second. I'm considering using delayedCall (because I'm using TweenMax.pauseAll): Something like this; updateCaller = TweenLite.delayedCall(0.2, handleHitTest); private function handleHitTest():void { // handle HitTest here updateCaller.restart(true); } Would this be the best approach or would it be better to use the build in Timer class. Thanks Rolf
-
Hey everyone so maybe you can help I have created a game using Flash CS6 and Flash Develop. I have objects that are added to the stage by a timer Event named "_Obstacles". These _Obstacles are all added Randomly to the stage. Now they get pushed onto the stage like so: private function addObstacle(e:TimerEvent):void { _Obstacles = new mcObstacles(); stage.addChild(_Obstacles); aObstacleArray.push(_Obstacles); trace(aObstacleArray.length); //TweenLite.to(_Obstacles, 2.7, {x: - 300}); } In my _obstacle class I removed this: if (sDirection == "R") { //Move obstacle left this.x -= nSpeed; } and added the line as shown above to my Main Engine class instead but its still be controlled by the timer: TweenLite.to(_Obstacles, 2.7, {x: - 300}); Now this works fine and they move across the stage correctly. But I am still experiencing major lag. I dont understand why. So I was thinking maybe it could be the TIMER_EVENT that is causing the lag and if i figure out how to push out the random array of objects every 2.7 seconds and remove the TIMER_EVENT someo how it will stop the lag. My game is simple and i dont understand why its lagging this is the only thing i can think of. Its a basic player jumping over the obstacles added to the stage by the timer. So I'm sure that the timer is the corporate. Please help.
-
Hi, does anyone have any experience with creating an accurate timer in AS3? I have used the Timer class and also setInterval in conjunction with my TweenMax project but none are very accurate. I have been reading about the Timekeeper class, but don't know exactly how to use it. http://www.computus.org/journal/?p=25
-
Hi all, I started routinely using Tweenlite.to() static method instead of a Timer by setting a fake target (like 'this') and just putting a onComplete on the tweenvars object. I dunno if I should, what about the efficiency of that trick? TweenLite.to(this,2,{onComplete:myFunc}); function myFunc() { //My instructions... }