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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:56:48+00:00 2026-06-13T04:56:48+00:00

I want to reinitialize a component by clicking a button.I use the following code,

  • 0

I want to reinitialize a component by clicking a button.I use the following code, but seem nothing is happening.

protected function createItem(event:MouseEvent):void
{
    this.currentState="Viewer";
    this.initialize();
}

Why?

  • 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-13T04:56:50+00:00Added an answer on June 13, 2026 at 4:56 am

    Yes I am referring the Flex Component lifecycle. I know there have
    four step for flex to create a Component, but Is there having a method
    to force Flex to execute those step again?

    Actually, there are much more steps than four to the Flex Component Lifecycle. See here and here for more information.

    What you may mean is that there are four methods run as part of the Flex Component LifeCycle; and those are createChildren(), commitProperties(), updateDisplayList(), and measure(). In the MX architecture, there is also a layoutChrome() method, but that is not commonly used.

    In Flex 4 Spark architecture; there are a lot of other hooks (partAdded(), partRemoved()) but they all extend off the MX Architecture.

    You may benefit from using the invalidation methods:

    • run invalidateProperties() on a component to force the commitProperties() to re execute during the next render event
    • run invalidateDisplayList() on a component to force the updateDisplayList() method to re-execute during the next render event
    • run invalidateSize() on a component to force the measure() method to re-execute during the next render event
    • In a Flex 4, Spark component, run invalidateSkinState() to force getCurrentSkinState() method to re-execute during the next render event.

      You can also remove a component from the stage using removeChild()–removeElement() for Spark containers–and then addChild()–addElement for Spark containers. That would essentially force the component to re-start it’s process.

      You could also create a brand new instance of the component and remove the old one.

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

Sidebar

Related Questions

Want the function to sort the table by HP but if duplicate HPs then
want to pass a simple integer to function after finding it. Code is as
Want to run javascript function from parent window in child window Example I have
want to have a Hyperlink-Button in a gridView in which I can display a
Want to code a key pad for an calculator. What I want to make
want to remove all css rules from inline css but not to remove display
I want to reinitialize d everytime in a loop char d[90]; while(ptr != NULL)
I want to use Boost test in my project. I use cmake in my
I want that diffrent events to call the same function. I read other post,
Want to replace dll files on IIS without restarting IIS or stop website but

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.