This content has been marked as final. Show 5 replies
mxml files are just Class files in a different format. so you can import them, instantiate them then place them wherever you want. I usually attach a bit of script to each file and write a function called setData(), that I can call to pass information to the new component. You should also find that in Design View there will be a folder in the comonents pane that lists your custom components.
One problem I have with components, is that I can not use STYLE Sheets. If I did not have that problem, you suggest using components encapsulate all of the logic for "different pages"?
"components encapsulate all of the logic for "different pages"?"
But what about the problem using style sheets in components? Is there a way to do that?
You can assign a style sheet to each component or define it at the top level. You can use the styleName attribute as you would a class definition in html.