Hi Alex,

To override the method in package org.apache.royale.net.URLLoader, I need to import mx.events.HTTPStatusEvent which is in emulation project.

method :

    COMPILE::JS
        override public function dispatchEvent(event:Object):Boolean
        {
            try
            {
                if(event.type == "httpStatus")
                {
                    var type:String = event.type;
                    var status:int = event.value;
                    var bubbles:Boolean = false;
                    var cancelable:Boolean = false;
                    event = new HTTPStatusEvent(type, bubbles, cancelable, status);
                }

                return super.dispatchEvent(event);
            }
            catch (e:Error)
            {
                if (e.name != "stopImmediatePropagation")
                    throw e;
            }
            return false;
        }

I am not sure if is it true to have such a dependency and how link emulation class to royale.

Thanks,
Serkan

28.02.2019 22:05 tarihinde Alex Harui yazdı:

Yes, I would recommend trying to override dispatchEvent in URLLoader.

HTH,

-Alex

*From: *Serkan Taş <serkan....@likyateknoloji.com>
*Reply-To: *"users@royale.apache.org" <users@royale.apache.org>, "users@royale.apache.org" <users@royale.apache.org>
*Date: *Thursday, February 28, 2019 at 11:04 AM
*To: *"users@royale.apache.org" <users@royale.apache.org>
*Subject: *Re: Work on Emulation

I assume you confirm Alex.

Thanks,
Serkan


Reply via email to