Using external library

Just starting out? Need help? Post your questions and find answers here.
poshu
Posts: 96
Joined: Mon Feb 24, 2014 11:46 pm

Using external library

Post by poshu »

Hello!
I'm trying to learn a bit about SpiderBasic, and tried to import a js lib but I'm clueless about the process, and couldn't find any help on the forum.

I tried this to import audio.js cause it seemed fairly simple.

So, from what I got, I should do something like that :

Code: Select all

Procedure LoadScript(script.s, *func)
	!$.getScript(v_script, p_func);
EndProcedure

Procedure Main()
	Protected value = 0
	!v_value = audiojs.createAll();
EndProcedure

LoadScript("audio.min.js", @Main())
When I debug value, it seems to have changed, so I assume audiojs.createAll() worked... And then? I should add an <audio> tag into the body part of the page, but have no idea of where it should be in my spiderbasic code.

Any help?