Using Flex components instead of AS3 classes

Hi: after my first great Flex experience using pure AS3 code, I’m going to try the “visual style”, using mxml, but I have found a show stopper. Although I am sure it a silly question:

  • I have a loop to display picture thumbs, with name and comments.
  • The picture, the text fields and the graphics ornaments are in a component.

I think about a Component as it is a Class, isn’t it true?

So I have instantiated the component as any other class, but I can’t communicate with its functions (setPictureName) or the properties. It fires an error in the main container.

On the other side: if I comment out the references to the functions, all the thumbs are perfectly displayed, with the ornaments I have drawn in the component. So the component IS there!!

No problem using a class written in pure AS3, but I think Flex components are better for graphic layouts, so I want to try it if someone can help me.

Regards: Miguel