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

  • SEARCH
  • Home
  • 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 739645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:25:28+00:00 2026-05-14T08:25:28+00:00

Question How can I animate and form rows together? Explanation One ‘for loop’ is

  • 0

Question
How can I animate and form rows together?

Explanation
One ‘for loop’ is for animation, the other ‘for loop’ is for making rows. I want to understand how to use arrays and create a row of sprite animations. I understand how to loop through an Array and create a Sprite for each index of the Array, but I’m having trouble putting my animation in rows.

Output
I got my number animation to play in a single row. When I add the loop to multiply it across the stage, it just blinks while continuing to animate.

‘for loop’ for animation

//FRAMES ARRAY
//THIS SETS UP MY ANIMATION FOR TIMER EVENT
var frames:Array = [
    new Frame1(),
    new Frame2(),
    new Frame3(),
    new Frame4(),
    new Frame5(),
    new Frame6(),
    new Frame7(),
    new Frame8(),
    new Frame9(),
    new Frame0(),
    ];

for each (var frame:Sprite in frames) {
    addChild(frame);
    }

‘for loop’ for rows

//THIS MAKES A ROW OF DISPLAY OBJECTS
                    var numberOfClips:Number = 11;
                    var xStart:Number = 0;
                    var yStart:Number = 0;
                    var xVal:Number = xStart;
                    var xOffset:Number = 2;
            for (var $:Number=0; $<numberOfClips; $++)
                    {
//DUDE ARRAY
                    var dude:Array = frames;
                    dude.y = yStart +11;
                    dude.x = xVal +55;
                    xVal = dude.x + dude.width + this.xOffset;
                    }

timer

var timer:Timer = new Timer(100);
timer.addEventListener(TimerEvent.TIMER, countdown);
function countdown(event:TimerEvent) {
    var currentFrame:int = timer.currentCount % frames.length;
    for (var i:int = 0; i < frames.length; ++i) {
        frames[i].visible = (i == currentFrame);
    }
}
timer.start();

counter experiment
My new class I’m working on loops through 10 different display objects that are numbers. For those following, I’m trying to make something like NumbersView.


INTENT
– Single Frames
‘individual sprites for each number’
– Individual behaviors for Flip, and LED

– Flip
‘each object is a flip animation with a number’ (can’t achieve with NumbersView)
– LED
‘each object is independent, allowing for 7-seg led patterns, or motions staggering walk-in effect’
– Odometer
‘odometer already achieved, but could achieve the same with tweens for each number’


HOPE TO LEARN
– arrays ‘understand how to use and combine arrays’
– for loops ‘how to use, and how to follow in a document’
– classes ‘at what point do I need to extend it as a class’

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

EXAMPLES
LED ‘same behavior and layout, but vertical increments’
http://www.youtube.com/watch?v=__TLrYH8NC4

FLIP NUMBER ‘great example of terminal board at airport
http://www.youtube.com/watch?v=fH0Aghm1TNE

ODOMETER ‘towards the end of the clip’
http://www.youtube.com/watch?v=DKavhec9fGE

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

  • 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-14T08:25:28+00:00Added an answer on May 14, 2026 at 8:25 am

    Your question is a little better now; I’ve modified the code I gave you for the Odometer slightly, and put in a small Tween inside an object using the Flash IDE. http://dl.dropbox.com/u/3987391/Odometer_Flip.fla

    Look at how little I changed in the code, from the Odometer example. The main thing I added is inside the flipper MovieClip. Inside it is an object called digitHolder, which animates using CS4’s 3D rotation tool. Inside digitHolder is the TextField which displays the number.

    As for the LED alternative, I imagine you could just use a font which looks like LEDs. Your Youtube link doesn’t work, so I can’t see what the example is, but I imagine a font would cover you.

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

Sidebar

Ask A Question

Stats

  • Questions 410k
  • Answers 410k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The event handler will be null unless somebody has subscribed… May 15, 2026 at 7:19 am
  • Editorial Team
    Editorial Team added an answer When implementing the dispose pattern you might also add a… May 15, 2026 at 7:19 am
  • Editorial Team
    Editorial Team added an answer try.. $('#inbox table').siblings().click(function(){ alert('hello inbox'); }); or $('#inbox *').not('table *,table').click(function(){… May 15, 2026 at 7:19 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.