如何在“TextFlowUtil”中跟踪导入进度

发布于 12-16 21:59 字数 332 浏览 7 评论 0原文

在 id="TextView" 的 TextArea 中,加载的 html 文本长度为 1080 行。此过程需要 3-4 秒,最好向用户表明这一点。

TextView.textFlow = TextFlowUtil.importFromString(data.readUTFBytes(data.bytesAvailable), WhiteSpaceCollapse.PRESERVE);

我认为TextFlowUtil中的延迟是在转换大量标签的过程中(例如,)。哪些活动可以提供帮助?是否有任何进度或完成事件需要挂钩?提前致谢!

In TextArea with id="TextView" the loaded html-text length is 1080 lines. This process takes 3-4 seconds and would be desirable to indicate this to the user.

TextView.textFlow = TextFlowUtil.importFromString(data.readUTFBytes(data.bytesAvailable), WhiteSpaceCollapse.PRESERVE);

I think the delay in TextFlowUtil is in the process of converting a large number of tags (e.g., <span>). What events can help? Are there any progress or completion events to hook? Thanks in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

今天小雨转甜2024-12-23 21:59:39

我不知道任何进度事件,但我只会显示一个刺轮:

import flashx.textLayout.events.FlowOperationEvent;

whatever.addEventListner( FlowOperationEvent.FLOW_OPERATION_BEGIN, begin);
whatever.addEventListner( FlowOperationEvent.FLOW_OPERATION_END, end);

funciton begin(evt:FlowOperationEvent){
  //Show spinny wheel
}
funciton end(evt:FlowOperationEvent){
  //hide spinny wheel
}

I don't know of any progress events, but I would just show a spiny wheel:

import flashx.textLayout.events.FlowOperationEvent;

whatever.addEventListner( FlowOperationEvent.FLOW_OPERATION_BEGIN, begin);
whatever.addEventListner( FlowOperationEvent.FLOW_OPERATION_END, end);

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