Wednesday, May 9, 2012

the style 'backgroundalpha' is only supported by type 'mx.controls.textInput' with the theme(s) 'halo'

When I created a new project on Flash Builder 4.5 and imported an old project to this space, I saw that there are a dozen of errors. All of them are "The style 'backgroundAlpha' is only supported by type 'mx.controls.TextInput' with the theme(s) 'halo'". I remember there was no error with the project so I googled to see the problem and it seems like flex does not have this style as of version 4. But our project was in flex 3 and I remember not setting the flex version explicitly when I created the project. Flash builder automatically added this version (flex 4)  to libraries and thus the old project code stopped working. When I switched back to flex 3, it began working again. To achieve this, I clicked on the project > properties > Flex Build Path and chose flex 3.