[
https://issues.apache.org/jira/browse/FLEX-35011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15112709#comment-15112709
]
Alex Harui commented on FLEX-35011:
-----------------------------------
Good question. IMO, there are several ways to go about this. For the
Spark-like component set I am currently working on, we'd try to emulate mx:HTML
in HTML/JS/CSS so I'd first try to use an Iframe since there is separation
between the HTML that mx:HTML loads and what the rest of the app can access.
IOW, your AS code can't easily access objects inside mx:HTML. That's sort of
true with content wrapped in an Iframe.
But for the "basic" component set in FlexJS, I don't think there would be a
replacement. Instead the philosophy is the reverse: to emulate existing HTML
components in ActionScript. So instead of an mx:HTML component, we would start
in on writing ActionScript so that emulates Div, Table, etc so that you can
interleave those tags with the rest of your MXML if needed. That's quite a bit
of work, although I've done code like that in the past on my old
blogs.adobe.com blog. But when you do that, then you can access the objects in
a block of HTML like any other MXML object.
Another thing that the "basic" component does try to do already is provide an
"html" property where there is also a "text" property, like labels for Buttons
and content for Label, TextInput and TextArea. So already, you should be able
to display HTML as content for these controls. There could be bugs there. Try
it and let us know. The SWF version may not work as well if the HTML contains
things that TextField's htmlText can't handle, but if the component isn't sized
to content it should give you a reasonable "mock" for what you'll get when
cross-compiled. Longer-term, if we get around to being able emulate HTML tags
in ActionScript then we'd replace TextField with that HTML renderer when
complex HTML is being rendered.
> Converting an existing air project
> ----------------------------------
>
> Key: FLEX-35011
> URL: https://issues.apache.org/jira/browse/FLEX-35011
> Project: Apache Flex
> Issue Type: Bug
> Components: FlexJS
> Affects Versions: Apache FlexJS 0.5.0
> Environment: Windows 10
> Reporter: Vandana
> Attachments: FlexJSTest.fxp, bin-debug.zip
>
>
> My requirement is to Convert an Existing Air(Desktop) application to FlexJS
> as its browser webkit is old and does not support HTML5 properly.
> I have created a sample desktop application in Flash builder 4.7 (SDK Apache
> FlexJS 0.50). When i run the application it is throwing error
> "This tag could not be resolved to an ActionScript class. It will be ignored."
> Please help me how to fix this type of error and also suggest me to convert
> existing Air application into FlexJS.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)