You can put the "mycomponent.mxml" file in a directory such as
"{application root}/com/mysite/controls".  Then, import it using:

 

import com.mysite.controls.mycomponent

 

This does work.  You can instantiate the component in mxml if you
include the namespace xmlns:mysite=" com.mysite.controls.*".  Then you
can instantiate the component like this:

 

<mysite:mycomponent />

 

Hope that helps...

 

-Andy

 

_____________________________________

Andrew Trice

Cynergy Systems, Inc.

http://www.cynergysystems.com

 

Blog: http://www.cynergysystems.com/blogs/page/andrewtrice

Email: [EMAIL PROTECTED]

Office: 866-CYNERGY 

 

________________________________

From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of dorkie dork from
dorktown
Sent: Tuesday, February 06, 2007 10:51 AM
To: [email protected]
Subject: [flexcomponents] How to import an MXML component

 

I missed this somewhere in the docs but I've created an MXML component.
As we all know you can't put MXML components in directories like,
"com.mysite.controls.mycomponent". So if one of my classes or projects
need to import this component how would I reference it? Like this? 

import mycomponent;

 

Reply via email to