If you've added the swc to your project you should be able to access it as if 
the class is in the same project.

Try bringing up code hints as you type 'Tracer' and see if it's listed. 
Otherwise try adding an import to the package that the class is in (assuming 
it's in a package).




On 1/8/09 10:14 AM, "dnk" <[email protected]> wrote:




Hi there i have written a very simple class in AS that has ben added
to a personal library (SWC).

Now in mxml I can reference the classes and components easily by
putting a:

xmlns:mycomps="*"

Now what I would like to know is how would I reference a class that is
in a SWC from action script?

So i have class called "Tracer" in my swc.

Now in my project (in some mxml file) I have:

<mx:Script>
<![CDATA[

// how can I use Tracer class in here?

]]>
</mx:Script>

I tried something like:

<mx:Script>
<![CDATA[

//no go - with the xmlns defined
mycomps.Tracer;

]]>
</mx:Script>

I can't seem to see any sort of option for an import.....

I am sure I am just missing something simple.

d


    

Reply via email to