使用动作脚本命名文件
我使用 Adobe 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
“适当”不会有正确答案。时间戳是一个合理的想法;如果视频的创建是用户驱动的,您可以随时提示他们输入名称(但默认为当前时间)。您可以使用 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 aDateFormatter
class can be used to generate your own.