Search found 131 matches

by Stefan
Tue Jul 26, 2022 5:31 pm
Forum: Coding Questions
Topic: Buttongadget and loadsound
Replies: 17
Views: 2841

Re: Buttongadget and loadsound

Here is working code that describes the problem. Global homepage.s,pic1,pic2,aSound,testlisticongadget ;homepage="https://doko-lounge.de/" homepage="" Declare LoadingError(Type, Filename$) Declare Loading(Type, Filename$, ObjectId) ; Register the loading event before calling any ...
by Stefan
Tue Jul 26, 2022 11:42 am
Forum: Coding Questions
Topic: Buttongadget and loadsound
Replies: 17
Views: 2841

Re: Buttongadget and loadsound

Instead of the variable "pic1" please try "ObjectId" in your "Procedure Loading" for the gadgets.
In this example, the sound and image would have the same objectid, so I took the name of the image.
by Stefan
Tue Jul 26, 2022 10:40 am
Forum: Coding Questions
Topic: Buttongadget and loadsound
Replies: 17
Views: 2841

Re: Buttongadget and loadsound

Try both variants of homepage Global homepage.s,pic1,pic2,aSound,testlisticongadget ;homepage="https://myhomepage.com/" homepage="" Declare LoadingError(Type, Filename$) Declare Loading(Type, Filename$, ObjectId) InitSound() OpenWindow(0,10,100,800,600,"TestWindow") tes...
by Stefan
Tue Jul 26, 2022 9:39 am
Forum: Coding Questions
Topic: Buttongadget and loadsound
Replies: 17
Views: 2841

Re: Buttongadget and loadsound

I have the events #PB_Event_Loading and #PB_Event_LoadingError bound. For the sake of clarity, I wrote the code like this. As I already wrote, the pictures are loaded, I just can't get them into the ButtonImageGadget. The sound will not load if the address is an external homepage. ListIconGadget als...
by Stefan
Tue Jul 26, 2022 9:11 am
Forum: Coding Questions
Topic: Buttongadget and loadsound
Replies: 17
Views: 2841

Buttongadget and loadsound

;works buttonPic=LoadImage(#PB_Any,"pictures/button.jpg.") ButtonImageGadget(1,10,10,ImageWidth(buttonPic),ImageHeight(buttonPic),ImageID(buttonPic)) ;doesn' work Programm hang buttonPic=LoadImage(#PB_Any,"https://myhomepage.com/pictures/button.jpg.") ButtonImageGadget(1,10,10,Im...
by Stefan
Mon Jul 25, 2022 6:34 pm
Forum: General Discussion
Topic: Instructions for creating an Android app
Replies: 28
Views: 5567

Re: Instructions for creating an Android app

Surprise, surprise, the problem is ElapsedMilliseconds()

Here is the solution:

Code: Select all

Procedure.d ElapsedMilliseconds2()
   Protected ms.d
   ! v_ms = (new Date).getTime()
   ProcedureReturn ms
EndProcedure
by Stefan
Sun Jul 24, 2022 7:09 am
Forum: General Discussion
Topic: Instructions for creating an Android app
Replies: 28
Views: 5567

Re: Instructions for creating an Android app

I don't use any of that.
Is it possible to issue Cordova with one command?
by Stefan
Sat Jul 23, 2022 9:24 pm
Forum: General Discussion
Topic: Instructions for creating an Android app
Replies: 28
Views: 5567

Re: Instructions for creating an Android app

Ich habe tatsächlich etwas gefunden: if("undefined"==typeof Spider)var Spider={};spider.system={batteryEventRegistered:0,batteryLevel:-1,defaultBrightness:0.5};function spider_InitSystem(){window.cordova&&cordova.plugins.brightness.getBrightness(function(a){spider.system.defaultBri...
by Stefan
Sat Jul 23, 2022 2:05 pm
Forum: General Discussion
Topic: Instructions for creating an Android app
Replies: 28
Views: 5567

Re: Instructions for creating an Android app

I don't use any device commands at all, just spiderbasic and javascript.
My code is 30,000 lines, it's just not possible to test every line.
Where can you turn DeviceAlwaysOn() on or off?
by Stefan
Fri Jul 22, 2022 2:22 pm
Forum: General Discussion
Topic: Instructions for creating an Android app
Replies: 28
Views: 5567

Re: Instructions for creating an Android app

There must be commands other than Device() that cause the error.
I suspect certain Javascipt commands. Unfortunately, I'm completely clueless.
It is also too complicated and too much tinkering. With Spiderbasic I finally managed to use a simple language.
Well, maybe one day there will be an update...