Strange behavior with variable

2019-08-29 11:04发布

There is very strange problem with variable in action script. I use it (variable) to dinamically change width of progress bar in my mp3 player, here is code:

filledProgress.width = Math.round (progressPercent * 1.56);

it works very good in the beginning, but after some time it stops, by stops I mean, filledProgress.width doesn't want to change its value from 0, although on the right part of expression is always some result, I even created different variable, to check whether it will get value from:

Math.round (progressPercent * 1.56);

And it works perfectly well, but filledProgress.width didn't change at all, however, after i reload and clear cash in my browser, it again starts to work, and again after short period of time stops.

What can it be?

1条回答
小情绪 Triste *
2楼-- · 2019-08-29 11:16

This behavior may occur due to removed event listener.

Check where you remove event listener in which you update width.

查看更多
登录 后发表回答