This content has been marked as final. Show 3 replies
if your app.mxml contains application tag which it looks like it does then you can't just take the code out of app.mxml and place it on your viewstack. I don't quiet understand what you are trying to do. but, i do this all the time, I create custom canvas/hbox/vbox and place them into viewstack object.
Like babo_ya said, one application can't be embedded within another application as a component. What you can do is change your app.mxml file so that instead of starting with Application tags, it instead starts with a container (think Canvas, HBox, or VBox). Once you do that, then the app.mxml can be referenced as a component within your main.mxml application.
I guess I'm just not understanding the difference betweeen the <local:app_code> in the app.mxml file and the <mx:Application> in my main application.
If I run the app.mxml by itself, everything is fine. if I try to take the code out and past it within the viewstack canvas I get reference errors. It can't find the objects/functions from the <local:app_code> namespace.
I guess I'm just confused on how to structure the entire application.
Thanks all for your responses.