Yuhjn
06-14-2009, 02:25 PM
I have an fla which has several library items with a class linkage to a GenericButton.as file. I am exporting this fla as an swc file, and linking that swc into flex.
My problem is that when flex builds the code for GenericButton it gets undefined property for anything it tries to reference that is part of the library item.
Example:
GenericButton.as does libLabel.text = "something"; where libLabel is a textfield, instantiated in the library clip which is bound to GenericButton in it's class linkage.
The field exists in the clip, but when I compile in Flex with the swc in there, it cant find it. It says libLabel doesnt exist, undefined property.
What am I missing here? I want to allow the fla author to bind some of his items to low-level component classes like that, and it's his job to ensure that all the necessary items are part of it. So if he makes a new button, he must just ensure he has a libLabel textfield somewhere in the clip.
Why cant flex see that the items it's trying to compile have a libLabel in there? Is there a work around?
My problem is that when flex builds the code for GenericButton it gets undefined property for anything it tries to reference that is part of the library item.
Example:
GenericButton.as does libLabel.text = "something"; where libLabel is a textfield, instantiated in the library clip which is bound to GenericButton in it's class linkage.
The field exists in the clip, but when I compile in Flex with the swc in there, it cant find it. It says libLabel doesnt exist, undefined property.
What am I missing here? I want to allow the fla author to bind some of his items to low-level component classes like that, and it's his job to ensure that all the necessary items are part of it. So if he makes a new button, he must just ensure he has a libLabel textfield somewhere in the clip.
Why cant flex see that the items it's trying to compile have a libLabel in there? Is there a work around?