Hi everyone,

In the Flex 1.5 docs there was a section on how to make a custom component in Flash and how to export it etc for use in Flex.  I have noticed that this content is missing from the new Flex 2 docs.

Is this not encouraged anymore or have they just not been included?

I have tried to make a swc component using the directions in the old docs. 

I am not very good with Flash at all - but here is what I did:

I am trying something simple - I create a graphic in Flash - in the library, I make the graphic to be a component called Navigator and I have an associated .as class file like this:

class Navigator extends mx.core.UIComponent {
    static var symbolName:String="Navigator";
    static var symbolOwner:Object="Navigator";
    var className:String="Navigator";

    function Navigator() {   
    }

    function init() {
        super.init();
        invalidate();
    }
}

I then export this as a swc and call it Navigator.swc.  I place this swc file in the root of my app - the same place where the mxml files are.  In my main.mxml I then try and instantiate it as <Navigator />

The Flex Builder compiler then says 'Could not resolve <Navigator> to be a component implementation.

Do I need to do anything else?

The end result needs (I guess once I have the basic thing above working) is to have a graphic with a bunch of objects of different shapes that are actually buttons - but they do not look like buttons - they have irregualr edges and I need to be able to disable/enable them from Flex and monitor in Flex when they get clicked etc.

Any idea as to where I am going wrong?

Thanks

Jonathan


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to