1
votes

In Silverlight I can write XAML definition and script logic in different files and it is very convinient are there any way to do same stuff in Flex?

3
that was quick...within 5 minutes the two possible ways of doing it were posted. SO still amazes me sometimes. - davr

3 Answers

2
votes

Do you mean the Script tag? It's just:

 <mx:Script source="myactions.as" />
1
votes

Besides the techniques described by the other posters here there are more advanced that are not about in which file the code is stored, but how to organize the collaborators and logic of your views. The Presentation Model pattern works very well in Flex, but there are also others. I recommend reading Paul Willams introduction to presentation patterns.