No support for embed at this time. We could make a nicer error I suppose. There is embedding support in HTML/JS/CSS, but AIUI, it requires Base64 encoding of the asset, which makes it larger. It just isn't clear to me that it is worth it. We don't generate code right now either because I think we should agree on what the "right" code is, if any. IMO, even converting embeds to an Image subclass that loads the image isn't the right pattern because it will cause re-layout and bad measurements at startup. I think smallest size, fastest performance is to convert images to SVG but I'm not sure we can do that automatically. In the framework itself, most of the symbols that were embedded were replaced by Unicode characters for arrows and cursors. Symbol fonts are also a possibility.
HTH, -Alex On 2/26/20, 6:26 AM, "Carlos Rovira" <[email protected]> wrote: IIRC, we don't support Embed, or at least don't remember to see nothing about that in the last months. I think it's some of the things will need to be converted with the rest of needed tweaks when come from Flex. El mié., 26 feb. 2020 a las 15:02, Yishay Weiss (<[email protected]>) escribió: > Makes sense. I was wondering mainly about some emulation to keep the > syntax. It looks like the compiler is trying to do something with these > declarations, but it could be unintended. > > From: Andrew Wetmore<mailto:[email protected]> > Sent: Wednesday, February 26, 2020 3:30 PM > To: Apache Royale Development<mailto:[email protected]> > Subject: Re: Embed in Royale > > I don't believe Embed is required or would be a benefit in Royale, if you > are going to compile an app to run on a browser using JavaScript. > > This page [1] on Flex equivalents says > > "Embedding assets was necessary in Flex so the application could quickly > access images and other assets that were part of a compiled Flash SWF. To > make it easy to display on a button an icon that was in a SWF, we wrote > something like: <mx:Button icon="@Embed('icons.swf#our_button')"/> Since > JavaScript does not support the concept of embedding assets, doing the same > thing in Royale is a simple URL reference: <mx:Button > icon="icons/our_button.png"/> (once you have placed the relevant image in > the *icons* folder). > > [1] > > https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapache.github.io%2Froyale-docs%2Fmigrate-an-existing-app%2Fflex-equivalents&data=02%7C01%7Caharui%40adobe.com%7Cad5395cd042147026e6708d7bac7c2c8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637183240009896732&sdata=LbzMSZ6uMQO5pJPivTBuer7EJC3HnOsDuEGiJbXGDuo%3D&reserved=0 > > On Wed, Feb 26, 2020 at 9:18 AM Yishay Weiss <[email protected]> > wrote: > > > Does Embed work in Royale? > > > > I’m working on a POC to port an app that has some css that looks like [1] > > this, but the compiler complains with messages such as > > > > [mxmlc] Error: The definition of base class BitmapAsset was not > found. > > > > Which makes sense as BitmapAsset does not exist in Royale src. > > > > Am I right in assuming that this is not yet implemented? > > > > Thanks. > > > > [1] > > .closeBtn { > > upSkin: Embed('/assets/16x16/button_cancel.png'); > > overSkin: Embed('/assets/16x16/button_cancel.png'); > > downSkin: Embed('/assets/16x16/button_cancel.png'); > > disabledSkin: Embed('/assets/16x16/button_cancel.png'); > > } > > > > > -- > Andrew Wetmore > > https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcottage14.blogspot.com%2F&data=02%7C01%7Caharui%40adobe.com%7Cad5395cd042147026e6708d7bac7c2c8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637183240009896732&sdata=JEwrl31eWYLMBfr3JaMi0JCFRK3Z0H3VaoBQU5URGKo%3D&reserved=0 > > -- Carlos Rovira https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Cad5395cd042147026e6708d7bac7c2c8%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637183240009896732&sdata=9UlK0PWh8hDpOPzriLfrWoTduvyUHzbpTm%2BpRYEMpmE%3D&reserved=0
