This content has been marked as final. Show 10 replies
I don't know.. but perhaps one of thos 249 warnings you have contains a clue.
The application compiles fine with the warnings.
I'm not sure, but can you create a component using new componentname()?
It's not an actionscript class, so why should you be able to create an instance of it.
You already have the components namespace declared. How about using that?
If you really want to do it in actionscript, try importing the full path. In my project, even though I call a component from a map in a lower level than were I call it from, i still have to type the entire path or I get the same error. You have a small path so shouldn't be a real problem. Mine is
But it would be
basically what i am trying to do is i have a view stack in the dashboard which will be controlled in the main application. So i have to create a new instance of import components.dashboard; so i can access the view stack in the dashboard.
Ok, so why not do it in MXML instead of actionscript?
ok so lets say you have a component name dashboard and in that component you have a view stack named summary how do you change that view stack to go to summary from the main application
Thanks for all the help you can give me I really appreciate it.
Same way as you would with an actionscript class. For example, say you have initialized your dashboard in your main application like this.
And in your dashboard component you have a viewstack with an id="viewSt"
Then you can change the properties of the viewstack (or any other control in your dashboard) from the main application like this:
Passing variables to childcomponents however is best done by binding. Perhaps you should post some code to show us what you want to do.
if you do this
<comp:dashboard id="dsh" visible="false"/>
the whole application will load the dashboard again in memory which causes the application to slow down.
True, but if all you wanna do is make the component (in)visible when you press a button or something then you should use states instead of the visible property.
Fixed it the problem was that there was another instance called dashboard and was conflicting