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 7727163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:23:27+00:00 2026-06-01T05:23:27+00:00

Please understand: I am a total beginner at Actionscript and anything like Actionscript, and

  • 0

Please understand: I am a total beginner at Actionscript and anything like Actionscript, and though I generally have some idea of what I’m doing as a programmer, I’m having some setbacks in self-learning this language and Flex Builder. Right now I’m trying to make a very simple implementation where a label effectively has its text added to multiple times over the first few seconds that the program is run. The problem I’m running into is that I can’t just put all that into one function + one call on that function, as changes to the label’s text are apparently not seen until that function runs its full course.

So I tried using a viewstack and cloning the canvas a few times, giving each canvas’s version of that label a different bit of text. Then I set the initialize function for the viewstack to change the canvases on regular intervals over the first few seconds. But that didn’t work either, as the difference isn’t seen until the function runs its full course.

So then I tried putting function calls on the individual canvases’ initialize attributes, and those functions aren’t being called at all apparently.

What the heck? I know this probably isn’t even the way that you’re supposed to animate something in ActionScript or Flex, but I still would like to know how to approach the problem this way for future reference. What am I missing? Thanks!

  • 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-06-01T05:23:29+00:00Added an answer on June 1, 2026 at 5:23 am

    As you’ve noticed, changes to the displayed output of your program can’t happen in the middle of executing a function that you’ve written. ActionScript is single-threaded, which means that none of the framework code that updates the screen can run while your function is running.

    If you’re interested in learning exactly what happens in order to update the screen, do a search for “flex component lifecycle” and read some of the stuff you find. It’s a bit advanced, but it was the thing that really helped me understand how the Flex framework works.

    Anyway, on to your real question – how to animate something. There are many ways, but for your case of progressively adding text to a label, I’d probably use the Timer class.

    Here is an example:

    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
    
      <fx:Script>
        <![CDATA[
          import mx.events.FlexEvent;
    
          private var timer:Timer;
          private var words:Array = ["The", "quick", "brown", "fox"];
    
          private function startTimer(event:FlexEvent):void
          {
            timer = new Timer(1000, 1);
            timer.addEventListener(TimerEvent.TIMER, updateText);
            timer.start();
          }
    
          private privatefunction updateText(event:TimerEvent):void
          {
            theLabel.text += words.shift() + " ";
    
            if (words.length > 0)
            {
              timer.reset();
              timer.start();
            }
          }
        ]]>
      </fx:Script>
    
      <s:Label id="theLabel" text="" creationComplete="startTimer(event)"/>
    
    </s:Application>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please not that I fully understand this is a dumb ass idea, but its
Can some one please guide me to understand which jar file i need to
I cannot understand how this is possible. Please help!! I have an app with
Veterans please forgive me for asking silly question. I understand that a class having
My English's suck, please understand it. I am a beginner in programming field. What
I am trying to use VIM for some programming. I am a total beginner
I'm a total python noob so please bear with me. I want to have
Before anything pops up in your mind, please understand that I am very new
Please, I'm trying to get some total value of user earned points in few
Please understand firstly that I fully understand that Java will return a String when

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.