同一容器中的多个预加载器
我遇到了一个奇怪的预加载器问题。我的画布内有 2 个预加载器。一种是显示曲目下载进度,另一种是显示曲目播放位置。似乎一次只有其中一个可以工作。
例如,如果我将第二个预加载器可见性设置为 false,则第一个预加载器 setProgress 函数可以正常工作。但是,如果我将第二个预加载器可见性设置为 true,则第一个预加载器的 setprogress 似乎不起作用。
每个画布只允许有一个预加载器吗?
<mx:ProgressBar id="downloadprogress"
mode="manual"
minimum="0"
maximum="100"
styleName="trackloadprogress" label=""/>
<mx:ProgressBar id="playbackprogress"
mode="manual"
minimum="0"
maximum="100"
label=""
styleName="trackplaybackprogress"/>
I'm having a strange preloader problem. I have 2 preloaders inside a canvas. One is to display the progress of a track downloading and the other is to display the position of playback of the track. It seems only one of them will work at a time.
For example if I set the second preloaders visibility to false then the first preloaders setProgress function works fine. If I however set the second preloaders visibility to true then the setprogress of the first preloader does not seem to work.
Are you only allowed one preloader per canvas?
<mx:ProgressBar id="downloadprogress"
mode="manual"
minimum="0"
maximum="100"
styleName="trackloadprogress" label=""/>
<mx:ProgressBar id="playbackprogress"
mode="manual"
minimum="0"
maximum="100"
label=""
styleName="trackplaybackprogress"/>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,这真的很愚蠢。当然,如果预加载器 2 在其上方,我就看不到预加载器 1。为了解决这个问题,我在预加载器 2 中添加了一个掩码,并使其宽度与最大宽度 * 进度相同。
Ok this was really dumb. Of course I couldnt see preloader 1 if preloader 2 was on top of it. To solve I added a mask to preloader 2 and made it's width the same as the maximum width * progress.