Page 1 of 1

populate a pulldown menu with folders from a list.

Posted: Sat Feb 06, 2010 3:39 pm
by reelstuff
I am trying to create a list of MP3 files in folders using a QT player, to play the files,

So far I can list mp3 files in a single folder, and play those files one by one,

I have several folders with MP3 files, I was hoping to create a pulldown menu
where the folders of the active directory is listed, so I could change from folder to folder listing the mp3 files of each folder.

Code: Select all

# Returns a filtered list of folders in the current directory
function filteredFolders
  return filterDots(the folders)
end filteredFolders
I attempted to call the above function and store the result so I could try to create a list of folder for the pull down menu,

But I could get no result,

Code: Select all

on mouseUp
   filteredFolders
   put it into fld "foldersList"
end mouseUp
I am not sure where I am going wrong, I tried calling the function several times,

function filteredFolders is in the stack script, is there a special method of calling functions contained in the stack?

As an aside note, I tested in a revlet, and was able to load the QT player controls, but they are unresponsive,

Re: populate a pulldown menu with folders from a list.

Posted: Sat Feb 06, 2010 5:09 pm
by Klaus
HI reelstuf,

at first glance:

Code: Select all

on mouseUp
   GET filteredFolders()
   put it into fld "foldersList"
end mouseUp
OR shorter:

Code: Select all

on mouseUp
   put filteredFolders() into fld "foldersList"
end mouseUp
Best

Klaus

P.S:
If I remember right, QuickTime players in Revlets have always set their "alwaysbuffer"
set to true, which makes this quite unusable :(

Re: populate a pulldown menu with folders from a list.

Posted: Sat Feb 06, 2010 6:06 pm
by reelstuff
Thanks Klaus, I can see how it works now, also perhaps they will change, up the revlet in the future.

thanks for taking time to post, it is always appreciated.

Tim

Re: populate a pulldown menu with folders from a list.

Posted: Sat Feb 06, 2010 6:27 pm
by bn
Tim,
you can make your own controls in a revlet to issue the play and stop command. Have a look at:
http://berndniggemann.on-rev.com/movieRevlet/
this is just a proof of principle stack. It could look nicer.
Dixie started to script QTVR, (panorama movies) which are broken at the moment in revlet. He and I came up with a nice implementation
http://berndniggemann.on-rev.com/qtvr/
regards
Bernd

Re: populate a pulldown menu with folders from a list.

Posted: Sat Feb 06, 2010 7:01 pm
by reelstuff
very nice, I will have to check that out, thanks for posting.

Re: populate a pulldown menu with folders from a list.

Posted: Sat Feb 06, 2010 9:04 pm
by FourthWorld
bn wrote:Tim,
you can make your own controls in a revlet to issue the play and stop command. Have a look at:
http://berndniggemann.on-rev.com/movieRevlet/
Why does that stack request permission to access my hard drive?

Re: populate a pulldown menu with folders from a list.

Posted: Sat Feb 06, 2010 10:29 pm
by bn
Richard,
Why does that stack request permission to access my hard drive?
It does not access the harddrive. It was just a very quick and dirty revlet I did some time ago when the question of whether and how to operate a player in a revlet came up.
Comming to think, there is a button that I used in the stack to set the filename of the player, it is not working in the revlet, maybe that is why the automatic Security Setting came up with this.
I will change the revlet by setting the Security settings right.
Thanks for pointing it out because I don't see it anymore since I accepted the settings a long time ago.
regards
Bernd

EDIT
I changed the revlet, it should not ask for any permissions anymore and now it show the currenttime of the movie in the scrollbar, you can pause/resume the movie, clicking in the player starts/stops the player.