同一容器中的多个预加载器

发布于 2024-11-19 14:02:52 字数 688 浏览 11 评论 0原文

我遇到了一个奇怪的预加载器问题。我的画布内有 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一指流沙 2024-11-26 14:02:52

好吧,这真的很愚蠢。当然,如果预加载器 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文