Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Fri Oct 18, 2019 2:43 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: drag & drop mp3,m4a & MPEGs from Finder into listbox
PostPosted: Thu Feb 25, 2010 10:56 pm 
Offline

Joined: Sat Jan 23, 2010 3:03 pm
Posts: 244
Location: Ohio, USA
Hi,

I want to drag and drop mp3, m4a & MPEG files from the Finder to my listbox
and save the location as the listbox entry and when clicked on play it in my movieplayer control

First thing first
how do I drag and drop mp3,m4a & MPEGs to my listbox

I will ask part 2 later in another post

Brian


Top
 Profile  
Reply with quote  
 Post subject: Re: drag & drop mp3,m4a & MPEGs from Finder into listbox
PostPosted: Fri Feb 26, 2010 12:21 am 
Offline

Joined: Thu Oct 05, 2006 11:45 pm
Posts: 1002
Location: Sol:Planet Earth:North America:California
Didn't you ask this already in the Making a Media Player thread? I mean seriously you are giving me a headache jumping around the threads asking the same question in multiple topics. :wink:

As to the question, you have, of course, done this before. Do a forum search for Drag and Drop and listbox and see what you get. Start with that. Someone else already mentioned to approach this one step at a time, practice it in a sample app then you have one piece of the puzzle complete then move on to the next.

_________________
This message made with 100% recycled pixels.
MacBook CD2.0/2GB/OSX 10.6.8 / REAL Studio 2010R1 Pro


Top
 Profile  
Reply with quote  
 Post subject: Re: drag & drop mp3,m4a & MPEGs from Finder into listbox
PostPosted: Fri Feb 26, 2010 8:13 am 
Offline

Joined: Thu Feb 22, 2007 7:08 pm
Posts: 1384
Such things are easy when you look more to folderitem, listbox, etc. in the language reference, or search the forum.
Add a filetype to the IDE and under Name write "mp3" and extension "mp3". Add a global sound array "mp3sound() as sound".
ListBox1.Open:
me.acceptfiledrop("mp3")

ListBox1.DropObject:
me.addrow replace(obj.folderitem.name, ".mp3", "")
mp3sound.append obj.folderitem.openassound

ListBox1.Change:
if me.listindex <> -1 then mp3sound(me.listindex).play


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group