FluorineFx.NET

Class Mapping

By using class mappings you can map an ActionScript class to a .NET class.

  • using Object.registerClass

    In the .NET code you should have a Full Type name (fully qualified class name) equivalent with the symbolID.

    Example (form pizzaservice):


    Object.registerClass("com.ariaware.pizza.vo.OrderVO", OrderVO);


    class com.ariaware.pizza.vo.OrderVO
    {
        var name:String;
        var orders:Array;

        //Constructor
        function OrderVO ()
        {
        }
        ...
    }

    on the server-side we have an "OrderVO" class in the "com.ariaware.pizza.vo" namespace

    namespace com.ariaware.pizza.vo
    {
        public class OrderVO
        {
            string _name;
            IList _orders;

            public OrderVO()
            {
            }

            public string name
            {
                get{ return _name; }
                set{ _name = value; }
            }

            public IList orders
            {
                get{ return _orders; }
                set{ _orders = value; }
            }
        }
    }
  •  
  • using web.config file

    Note: use this option only if for some reason the previous option cannot be applied

    <classMappings>
        <classMapping>
            <type>.Net class name</type>
            <customClass>ActionScript class name</customClass>
        </classMapping>
    </classMappings>


    Note: "classMappings" section name is important as defines the "classMappings" config handler class ( this handler will read the mappings)
    Note: <type> tag is your .NET class full type name
    Note: <customClass> tag is your ActionScript class full type name