使用动作脚本命名文件

发布于 2024-12-19 14:13:59 字数 126 浏览 2 评论 0原文

我使用 Adob​​e flex 4.5 创建一个用于录制视频的应用程序,我想知道如何为生成的文件指定适当的名称。我的想法是给出唯一的当前时间戳,您的意见是什么,是否有更好的解决方案以及如何使用动作脚本实现它?

提前致谢!

i create an application using Adobe flex 4.5 for recording videos and i was wondering how to give appropriate names to my files produced. What i was thinking is to give the current timestamp which is unique what's your opinion, is there a better solution and how can it be implemented using actionscript?

Thanks in advance!

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

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

发布评论

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

评论(1

影子的影子 2024-12-26 14:14:00

“适当”不会有正确答案。时间戳是一个合理的想法;如果视频的创建是用户驱动的,您可以随时提示他们输入名称(但默认为当前时间)。您可以使用 new Date().toString() 生成日期字符串。如果默认格式不是您想要的,可以使用 DateFormatter 类来生成您自己的格式。

There isn't going to be a correct answer for "appropriate". Timestamp is a reasonable idea; if the creation of videos is user-driven you could always prompt them (but default to the current time) for a name. You can generate the date strings with new Date().toString(). If the default format isn't what you want a DateFormatter class can be used to generate your own.

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