---
id: 116
title: >-
  Adobe Flex : Never try to manipulate the children components from the
  ActionScript constructor
slug: >-
  adobe-flex-never-try-to-manipulate-the-children-components-from-the-actionscript-constructor
date: '2008-06-14T15:05:00Z'
modified: '2008-06-14T15:05:00Z'
status: publish
type: post
author: pmoelgaard
categories:
  - ActionScript 3.0
  - Adobe Flex
tags:
  - Best Practices
excerpt: null
canonicalPath: >-
  /posts/adobe-flex-never-try-to-manipulate-the-children-components-from-the-actionscript-constructor
featuredImage: null
commentCount: 0
wordCount: 76
readingTimeMinutes: 1
hasMedia: false
hasVideos: false
url: >-
  https://forwardthinking.pemo.me/posts/adobe-flex-never-try-to-manipulate-the-children-components-from-the-actionscript-constructor
---
This is a common mistake made by developers using this pattern. For example, you try to set the button label in the constructor. If you tried this you would get a null value error for the button since it has not been created yet. MXML creates the children components in the initialize() phase so the best way to work around this is to override initialize(), call super.initialize() first and then you can start accessing children components.
