Skip navigation
Currently Being Moderated

tlf2.0 float(flex 4.0 update for tlf2.0)

Aug 2, 2010 5:49 AM

I do as the article Flex4 updates for tlf2.0, but  when i use float attribute such as "left" or "right" ,the image will disappear,


1. load the sdk 4.0.14159

2. replace the the files (    and;

3. replace the textLayout.swc in the framework ant -q main


then I set the flashbuilder 4's sdk with the sdk I just changed.


Do i miss something or i do something wrong?

the <img />  float="left" or "right" the img is disappear, but there is no compiler error or runtime errors.

  • Currently Being Moderated
    Aug 2, 2010 12:34 PM   in reply to zhangbaoustc

    I had to do one additional step, which was to set the Framework linkage in the Properties for the application under "Flex build path" to "Merged Into Code".


    The new list features aren't working correctly when accessed via mxml -- I will submit a fix for this.


    I wrote a very simple back to basics application that does work, can you try it? Also, if this app works, can you post your application that doesn't work? My best guess is that the problem has to do with the connection to Flex, and once we can repro it here it may be easy to fix. I'll add another mxml application that is working for me.




    - robin



        import flash.display.Graphics;
        import flash.display.Sprite;
        import flash.geom.Rectangle;
        import flashx.textLayout.container.ContainerController;
        import flashx.textLayout.elements.InlineGraphicElement;
        import flashx.textLayout.elements.ParagraphElement;
        import flashx.textLayout.elements.SpanElement;
        import flashx.textLayout.elements.TextFlow;
        public class Test extends Sprite
            public function Test()
                var s:Sprite = new Sprite();
                s.x = 100;
                s.y = 100;
                var span:SpanElement = new SpanElement();
                span.text = "Hello";


                var ilg:InlineGraphicElement = new InlineGraphicElement();
                var inline:Sprite = new Sprite();
      , 0, 100, 100);
                ilg.source = inline;
                ilg.float = "left";


                var paragraph:ParagraphElement = new ParagraphElement();
                var textFlow:TextFlow = new TextFlow();
                textFlow.flowComposer.addController(new ContainerController(s, 600, 600));


    Here's the mxml one:


    <?xml version="1.0" encoding="utf-8"?>
    <Application xmlns:fx=""
                 height="600" width="800">
            import flashx.textLayout.conversion.ConversionType;
            import flashx.textLayout.conversion.TextConverter;
            import flashx.textLayout.elements.TextFlow;
            public function traceContent():void
                trace(TextConverter.export(myRET.content as TextFlow, TextConverter.TEXT_LAYOUT_FORMAT, ConversionType.STRING_TYPE));
        <RichEditableText id="myRET" click="traceContent()" height="100" width="200">
                <p><span id="span1">This is span 1.</span><img float="left" width="100" height="100" source="gremlin.jpg"/></p>

    Mark as:
  • Currently Being Moderated
    Aug 2, 2010 5:35 PM   in reply to zhangbaoustc

    Sounds like it. We'll investigate and see if we can duplicate your results and fix. Thanks!


    - robin

    Mark as:
  • Currently Being Moderated
    Aug 5, 2010 1:35 AM   in reply to zhangbaoustc

    Hi Zhangboustc,


    I too came across this error. The problem in my case was that I tried to recompile the flex 4.1 sdk with the new changes for TLF 2, which worked, but on using it in an application it produced the same error :


         TypeError: Error #1034: can't converter  GlobalSWFContext@7315fc1 to mx.core.IFlexModuleFactory。


    When I recompiled the 4.0 sdk, I did not have this error. You might want to check if you recompiled the 4.0 sdk (not the 4.1) and that you actually replaced the 2 classes that are necessary for your custom sdk build. If you compare the old and the new classes you will see that some of the changes regard GlobalSwfContext and IFlexModuleFactory typing.

    Mark as:
  • Currently Being Moderated
    Aug 5, 2010 9:37 AM   in reply to Tim@Edge



    Make sure you turn off RSLs.  From the Properties for your project Select "Flex Library Build Path", select the "Library Path" panel and change the "Framework linkage" to "Merged into code".


    Hope that helps,


    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points