Not sure if this forum is still as active as it once was but I'll give it a
go.......

We have a massive Flex application that we are probably not going to have
converted to HTML/JS by the time FlashPlayer is turned off at the end of
2020.

So as a stop gap solution we are going to try the locally installed Air App
that downloads and the loads in the old SWF file (I see from previous posts
this seems to be a popular approach).

I'm using the "download SWF as bytes and load into a SWFLoader" approach. In
a condensed form, basically this: 

        private function loadExternalSwfViaBytes(swfUrl:String):void {
                var urlRequest:URLRequest = new URLRequest(swfUrl);
                var urlLoader:URLLoader = new URLLoader();
                urlLoader.dataFormat = URLLoaderDataFormat.BINARY;
                urlLoader.addEventListener(Event.COMPLETE, UrlLoaderComplete);
                urlLoader.load(urlRequest);
        }

        private function UrlLoaderComplete(event:Event):void {
                try {
                        var loader:URLLoader = URLLoader(event.target);
                        var context:LoaderContext = new LoaderContext();
                        context.allowLoadBytesCodeExecution = true;
                        swfLoader.loaderContext = context;
                        swfLoader.load(loader.data);
                } catch (e:Error) {
                        logEvent("UrlLoaderComplete Failed: " + e.message);
                }
        }

The SWF successfully loads but not all the styles and skins from the SWF are
being used. Styles and skins from the loading app are used instead. There
are LOADS of styles and skins and it's not possible to load them all in the
launching app.

Is there anything that can be done to ensure all the styles and skins from
the loaded SWF get used?



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/

Reply via email to