开发者

Flex Spark TitleWindow bad redraw on dragging

I have a problem with redrawing in flex 4. I have a spark titleWindow, and if i drag it faster, it looks like it's mask is one frame late after the component. it's easily visible with 1pixel thin border, because it becomes invisible even with slower movement.

You can try it here (what is not my page, but it's easier to show you here than uploading example):

http://flexponential.com/2010/01/10/resizable-titlewindow-in-flex-4/

If you move in direction up, you see disappearing top border. in another directions it's not that sensitive as it has wide shadow, and it's not very visible on shadow.

On my computer i see it on every spark TitleWindow i have found on google, although it's much less visible with less contrast skins, without borders or with shadows.

Do you see it there? i had never this problem with halo components. It's doing the same thing with different skins. I tried to delete masks from skin, cache component, skin even an application as bitmap with no succes开发者_JAVA技巧s.

I also turned on redraw regions in flash player, and it looks like it's one frame late after titlewindow too.

Does anyone know why is it doing this or how can i prevent it?

Thank you

UPDATE:

no answers? really?


I have been facing the same problem and I was really pissed that I couldn't find any answer.

The problem with me was, that I tried to center the component "component.x = (parent.width - component.width) / 2" and then draw that component programatically. The problem was, that component.x is a Number which can lead to floating values like 10.5 or similar. And it looks like that bitmapFill function rounds floats DIFFERENTLY than drawRect function, which makes exactly the 1px line around the objects (but ONLY when parent.width is an odd number). Strange thing for me was, that I only called the Draw function once, but still this line keep recurring ...

Doing Math.floor(component.x) solved the issue.

P.S.: I think that you can also help your issue by setting cacheAsbitmap=true on the dragged object ...

Cheers, Jan Prazma

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜