Thanks IanM
Please look at function it works on images
I could not find any unzipped objects
sound file loads to dir but does not play please review
Rem Function To Load Media 1st from local File or if absent from Internet
Rem By JOhn James aka Codger
Rem Major contributions by IanM
LoadMedia("http://aitcherif.free.fr/texture/science_fiction/planete/images/Earth_jpg.jpg","Earth.jpg",1,1)
sprite 1, 10,10,1
sync : Sync
wait key
delete sprite 1
remstart
I was unable to test the loading of models as I could find none that were unzipped
LoadMedia("http://sunserver1.rz.uni-duesseldorf.de/~pannozzo/3DS_DATA/OBJECTS/bar.3ds","Bar.3ds",1,2)
Position camera 0, 0,-100,0
sync : Sync
wait key
remend
rem the file is loaded to the but does not play any ideas
LoadMedia("http://www.dailywav.com/0103/onlypower.wav","onlypower.wav",1,3)
play sound 1
sync : Sync
wait key
delete sound 1
function Loadmedia(URL$,Dest$,IMG,OBJTYPE)
select ObjType
case 1 : Rem Image
load dll "urlmon.dll", 1
If file exist (Dest$)= 0
Result = call dll(1, "URLDownloadToFileA", 0, URL$, Dest$, 0, 0)
endif
If file exist (Dest$)= 0
Text 10,10, "FIle does not exist"
delete dll 1
wait key
exit
else
Load image Dest$,IMG
endif
delete dll 1
Endcase
Case 2 : Rem Object
load dll "urlmon.dll", 1
If file exist (Dest$)= 0
Result = call dll(1, "URLDownloadToFileA", 0, URL$, Dest$, 0, 0)
endif
If file exist (Dest$)= 0
Text 10,10, "FIle does not exist"
delete dll 1
wait key
exit
else
Load Object Dest$,IMG
endif
delete dll 1
Endcase
Case 3 : Rem sound
load dll "urlmon.dll", 1
If file exist (Dest$)= 0
Result = call dll(1, "URLDownloadToFileA", 0, URL$, Dest$, 0, 0)
endif
If file exist (Dest$)= 0
Text 10,10, "FIle does not exist"
delete dll 1
wait key
exit
else
Load sound Dest$,IMG
endif
delete dll 1
Endcase
EndSelect
EndFunction
System
PIII 650 MZ H.P. Pavillion
394 Mem GeForce 4 400MX