This content has been marked as final. Show 2 replies
Far as I know, your main mxml application needs to call the component that contains your other component.
In the <application> tag of your main mxml, setup up a reference point to correspond to the location of your components (we'll call the reference 'comp1' and assume it points to a project folder named 'components' which contains both of your components).
<application ... xmlns:comp1="components.*" ...>
Any time you need to include your first component in your main application mxml, you can reference it as <comp1:component_name .../> where component_name is the name of your first component.
Now, within your first component (we'll assume it's base is canvas, though it could be a number of containers such as HBox, etc), you'll need to declare a reference point again in the same fashion, except within your container's tag since it won't have an application tag.
<canvas ... xmlns:comp2="components.*" ... >
Now that we've declared this, you can place your 2nd component into your 1st component the same way you placed your 1st component into your main application. This time specify the 2nd component name
<comp2:component_name2 ... />
Hope this is what you are looking for
Please state specifically who owns what. Is it this:
In that case you can access comp2 from comp1 by application.comp2.propertyOrFunction