Page 2 of 2

Re: Loadimage_net()

Posted: Sat Jul 12, 2014 2:14 pm
by heartbone
idle wrote:@heartbone

yes there's a bug in transparency on linux but please don't hijack threads.
editing your previous post would have been a better option.
I did NOT hijack the thread, but merely extended it to show how useful dobro's concept is.
Editing the first thread would have obliterated the differences between the two versions, which some might find informative.
Also, the vain in me thinks that editing a thread that contains code could be interpreted as fixing a goof. :P

But thanks for your feedback idle, for at least now I know that at least one other person has acknowledged a bug that I've discovered and took the time to submit to the forum.
I can only ASSUME that the people responsible for fixing it have gotten the message. :?: :?: :?:
The PB bug status communication should be a lot better.
I can only ASSUME that if the compiler developers don't shoot a bug report down, then it is accepted???

That the old saying about ASS - U - ME has some validity.
dobro wrote:and For the Module :)

although this will Purebasic has these functions in Native :)

I wanted absolutely to the writing on the disc in case we want to Keep the file;)

Code: Select all

;***********************************************
;Titre  :*loadmodule_net()
;Auteur  : Dobro
;Date  :12/07/2014
;Heure  :11:52:37
;Version Purebasic :  PureBasic 5.22 LTS (Windows - x86)
;Version de l'editeur :EPB V2.58
; Libairies necessaire : Aucune 
;***********************************************

Declare.l Loadmodule_net(Adr$,nom_module$)

InitSound()
chm$="http://michel.dobro.free.fr/Forum_pb/Outrun3.mod"


OpenWindow(0,0,0,320,200,"test",#PB_Window_SystemMenu)
TextGadget(1,10,10,320,35,"OutRun 3 ....  Wait Loading ...")
mo=Loadmodule_net(chm$,"Outrun3.mod"):PlayMusic(mo)
Repeat 
	Event = waitWindowEvent(2) 
Until Event =   #PB_Event_CloseWindow


Procedure.l Loadmodule_net(Adr$,nom_module$)
	; By Dobro
	;Adr$=adresse du fichier module a charger
	;nom_module$ = nom qu'on donne a cette image
	; la procedure renvoi l'Id de l'image recupéré
	InitNetwork()
	If ReceiveHTTPFile(Adr$, GetTemporaryDirectory()+nom_module$)
		id_module=LoadMusic(#PB_Any, GetTemporaryDirectory()+nom_module$)
		
		DeleteFile(GetTemporaryDirectory()+nom_module$)
		Debug "Module récupére !"
		ProcedureReturn id_module
		Else
		Debug "Erreur"
	EndIf
EndProcedure
; Epb

Nice. :D
If I could only learn how to create .mod from .mid, Then I'd be set. :wink: