From: annaelle19 on
Can I read files in a folder with director? and use the name, the lenght and play them in a project?

annaelle19
From: Mike Blaustein on
There is a built in command called getNthFileNameInFolder() which you
can use to get the names of all files in a given folder. I don't know
what you mean about "length", but if those files are the sort that can
be imported into Director, then you can bring them in at runtime. The
method of doing so will depend upon what sort of files they are (images,
sounds, etc)
From: annaelle19 on
Perfect, Thanks!
The file in the folder are .mov or .mpg video.
Now I can open the video without having to import them in the cast?
with instruction like:
soundChannelObjRef.playFile(stringFilePath)
but for the video?

annaelle

From: Mike Blaustein on
For video, it will depend upon the video format you are using. If you
have .mov files, then you would likely want to use the quicktime xtra.
It comes with Director and is free to use. The down side is that you
need to make sure that your client machines all have Quicktime
installed. Quicktime should be able to also play your mpg files. You
can put a #quicktime member on the stage and set it's .filename property

member("QT").filename=the moviePath&"someMovie.mov"

You would use the actual name of your QT member instead of member("QT")
of course. And substitute the corret path/filename for your target
movie file.

If you do not want to worry about having QT installed, then you could
use an xtra like MPEGAdvance which is not free, but it is super easy to
use and does not require the QT runtime to be installed.