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?
+2
A:
Do you mean the Script
tag? It's just:
<mx:Script source="myactions.as" />
eduffy
2009-06-11 18:08:37
This way has the advantage of not requiring you to re-declare all your MXML components inside the AS file
davr
2009-06-11 19:37:33
+4
A:
You could try using the code behind technique: http://www.adobe.com/devnet/flex/quickstart/building_components_using_code_behind/
bkildow
2009-06-11 18:12:09
+1
A:
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.
Theo
2009-06-12 13:02:00