Search code examples
actionscript-3apache-flexactionscriptfilenamesflex4.5

Naming of files using actionscript


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!


Solution

  • 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.