Menu

Possible to use in Pure as3?

2009-06-10
2013-04-18
  • Thomas Nesse

    Thomas Nesse - 2009-06-10

    I have a pure as3 project I would like to use this in, but I'm not quite sure if it's posssible.

    I've tried a basic test:
    ----
    var htmlString:String = "<html><head><title>Hello HTML</title></head><body><p>Hello World!</p></body></html>";
    var html:Element = HtmlParser.parse(htmlString);
    var o:UIComponent = FlashHtmlRenderer.render(html);
    if (o == null)
    {
        trace("Unable to render html");
        return;
    }
    addChild(o);
    ----
    But I get:
    [Fault] exception, information=Error: No class registered for interface 'mx.styles::IStyleManager2'.
    Fault, Singleton.as:111

    I'm guessing it's the flex components that fail.

    Any idea before I spend more time on it?

     
  • Erik Blankinship

    It looks like this code is dependent on flex.  Any plans or thoughts about how to remove flex dependencies from this project?

     
  • ITabirca

    ITabirca - 2009-10-08

    This is the only html parser (for flash) i found on the web in 2 days…
    So i gues i'll try to make it a pure as3 project - i like Flex as much as i like the Flash IDE.

     
  • ITabirca

    ITabirca - 2009-11-03

    In FleshHTMLRendered.as, method renderHelper, where you check the elementType, there is no case for Constant.elementTypeHTML. You create the base element for this object but the &quot;default&quot; in the switch changes it to null. So, any html code that has a html tag won't render (will throw an exception trying to add a child null to the container).

     
  • Sanity11

    Sanity11 - 2010-04-04

    I also had this, but changed the swc link type to external. But then it comes up with another error I have just posted in the help forum.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.