Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 602231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:48:00+00:00 2026-05-13T16:48:00+00:00

My meter looks great and the needle rotates in a loop. How do I

  • 0

My meter looks great and the needle rotates in a loop. How do I add easing to it?

The meter is built from a timer event. I want the needle to bounce at the end. Rather than just adding a variable, I need some control of when it happens so I can adjust it with the animation.

alt text http://www.ashcraftband.com/myspace/videodnd/icon8.jpg

WORKING CODE “Thxs to member”

var timer:Timer = new Timer(20, 30);//tick 200, 36<br>

timer.addEventListener(TimerEvent.TIMER, onTimer); 
timer.addEventListener(TimerEvent.TIMER_COMPLETE, startAgain); 

timer.start(); 

function startAgain($evt:TimerEvent):void { 
    timer.reset(); 
    timer.start(); 
} 

function onTimer($evt:TimerEvent):void { 
    watch.hand.rotation = 30 + timer.currentCount;//tick 5 
} 

FAILED ATTEMPT “needle’s crazy, it’s just suppose to bounce”

//the "tick" may mess up the effect

import fl.transitions.Tween;
import fl.transitions.easing.*;
var timer:Timer = new Timer(20, 30);//tick 200, 36
  var startValue:Number = watch.hand.rotation;
  var finishValue:Number = 33;//400
  var duration:Number = 222;//3
  var myTween:Tween = new Tween(watch.hand, "rotation", Elastic.easeOut, startValue, finishValue, duration, false);//true
  myTween.looping = true;
timer.addEventListener(TimerEvent.TIMER, onTimer); 
timer.addEventListener(TimerEvent.TIMER_COMPLETE, startAgain); 

timer.start(); 

function startAgain($evt:TimerEvent):void { 
    timer.reset(); 
    timer.start(); 
} 
function onTimer($evt:TimerEvent):void { 
    watch.hand.rotation = 30 + timer.currentCount;//tick 5
 //watch.x =+ 66;

} 

EXPERIMENT
My project will requires a higher understanding of timer events and tweening. If I can get this animation to do stuff, I think I can better understand how to pass function calls and set up events.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T16:48:00+00:00Added an answer on May 13, 2026 at 4:48 pm

    As @pfunc mentioned, this is going to be far easier to accomplish with a third party tweening library. It can be done with fl.transitions.Tween, but the chaining of tweens and onComplete handling is less than desirable.

    As mentioned, check out one of these:

    GTween

    TweenLite

    Tweener

    All of these 3 have a very similar API (which is far better than Flash’s built-in Tween – IMHO)

    When I helped out with your original question about the Timer class, I did not realize that this is what you wanted to do. The Timer class is not a suitable choice for this problem as it is intended for events to be handled on consistent basis.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a Java game and I want to implement a power meter for
I'm trying to add a progress meter, or other I'm busy right now notification
I currently have a table structure that looks something like this(some details omitted): ColumnName
For a bit of background, I'm writing a meter reading application in C for
I am trying to create a meter bar in Flash. I am creating an
For example as Download Meter app does. Can I track packages dispatched? Does iOS
Eric Meyer's advice to keep individual rules alphabetized in a CSS style definition makes
I came across a printed article by Bertrand Meyer where he states that tests
For a current project, I was thinking of implementing WebDAV to present a virtual
I realize they have an API but some of the questions I have wouldn't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.