With MXML components, I've seen a pattern used where you have an AS3 class, then the MXML subclasses it, to have a separation between view/code (anonymized from real code):
package com.john
{
public class MyComponent extends Canvas
{
...
}
}
<?xml version="1.0" encoding="utf-8"?>
<logic:MyComponent xmlns:logic="com.john.*"
xmlns:mx="http://www.adobe.com/2006/mxml">
...
</logic:MyComponent>
At least I think the MXML component is subclassing the AS3 class?
Anyway is it possible/advised to do this with my main MXML application file, so I can put manager instances and things in the AS3 MyApp class, which is subclassed by Main.MXML?
Real/pseudo code examples are most welcome.