Skip navigation
Currently Being Moderated

Apparent cumulative error bug in Toolkit for CreateJS exporter.

May 2, 2013 1:18 PM

Tags: #error #cs6 #toolkit_for_createjs



All the text in the .fla, original_swf_map.png, is one object, just_the_text.png.  When exported with Toolkit for CreateJS, there seems to be some error accumulating over the bits of text until some become quite far off from their original mark: generated_html_map.png.


I don't see this problem with simpler fla's of the same format, but it becomes apparent with one that's this large.  I could e-mail the generated .fla, but I'm not allowed to share it in a public forum.

  • Currently Being Moderated
    May 2, 2013 11:40 PM   in reply to jbabertntn

    Have you considered merging all your text in one bitmap-layer? Since you don`t seem to use code to fill in contents and are looking for pixel perfection this would be the obvious choice.

    Mark as:
  • Currently Being Moderated
    May 3, 2013 5:42 AM   in reply to jbabertntn

    I ran some tests and this is what is causing your layout problems (probably)

    Internally Flash stores positions to a 0.05 pixel accuracy.

    But when exported to javascript via JSFL you end up with only 0.1 pixel accuracy.


    This is script that randomly places textfields on stage:


    import flash.text.TextField;


    for (var i:int=1;i<1000;i++){


    var tf:TextField=new TextField();

    tf.x = Math.random()*stage.stageWidth;

    tf.y = Math.random()*stage.stageHeight;

    tf.text = "tf"+i;





    in the output you see that flash actually "rounds" the positions to 0.05 pixel accuracy whereas javascript rounds that value even once more (to a .1 accuracy).

    This might be the loss you are feeling gets accumulated.

    Mark as:
  • Currently Being Moderated
    May 15, 2013 2:24 PM   in reply to jbabertntn

    Are all texts left-aligned?


    I had a similar problem with right aligned text.

    In the latest Toolkit v1.2 that problem was solved.

    But only left-aligned texts are rotated ok.

    Mid- and right-aligned texts will get a displacement when rotated.

    Mark as:
  • Currently Being Moderated
    May 16, 2013 5:42 AM   in reply to jbabertntn

    Sorry no. There is not really a site for Toolkit problems.

    ( <>


    One difference between flash and CreateJs is, that the registry point is not

    used in runtime flash, but it is in CreateJs.

    So I guess it should be possible to get the correct rotations by the setting

    registry points of the texts.

    But left-aligning seems less work to me.




    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)