JSFL - Adjust elements x,y to integer

This script adjust the coordinates (x,y) of all elements on the stage and in the library into integers.

There are 2 problems related to an element (symbol) x,y positions set to float points (with decimals, e.g. 10.1 ). One is related to tweening and the other one is related to blurred pixel fonts. If an element has multiple elements inside it and the child elements’ coordinates are not integer, when the parent element start to move, the child elements wobble. For pixel fonts or bitmap text, when the x,y are not integers, the text appear to be blur as shown in the example below. All these problems can be solved by setting the x, y into integers. With this script, the process is automated. >>enjoy<<

[swf]http://www.shang-liang.com/blog/attachment/blurexample.swf, 500,300[/swf]

  1. borzoj

    hi!
    found a couple of interesting posts on your blog. but when i wanted to subscreibe through google reader i couldn’t find the rss feed link. i was finally able to figure out but for the sake of other users who read blogs through rss - put your feed link somwehre on the page!

Leave a Reply

For spam filtering purposes, please copy the number 1197 to the field below: