Page 1 of 1

Load image error (deprecated?)

Posted: Wed Nov 13, 2024 7:56 am
by Caronte3D
This is the error message you get if run the example in the documentation:
PixiJS Deprecation Warning: PIXI.loaders.Loader class has moved to PIXI.LoaderDeprecated since v5.0.0

Code: Select all

;
; ------------------------------------------------------------
;
;   SpiderBasic - Image example file
;
;    (c) Fantaisie Software
;
; ------------------------------------------------------------
;

Procedure Loaded(Type, Filename$, ObjectId)
  
  ; Display the image in a new window
  OpenWindow(#PB_Any, 10, 10, ImageWidth(ObjectId), ImageHeight(ObjectId), "Image")
  ImageGadget(#PB_Any, 0, 0, ImageWidth(ObjectId), ImageHeight(ObjectId), ImageID(ObjectId))
  
EndProcedure

Procedure LoadingError(Type, Filename$, ObjectId)
  Debug Filename$ + ": loading error"
EndProcedure

; Register the loading event before calling any resource load command
BindEvent(#PB_Event_Loading, @Loaded())
BindEvent(#PB_Event_LoadingError, @LoadingError())

LoadImage(0, "Data/SpiderBasicLogo.png")

Re: Load image error (deprecated?)

Posted: Wed Feb 05, 2025 9:45 am
by Fred
Deprecated warnings is not an issue.

Re: Load image error (deprecated?)

Posted: Wed Feb 05, 2025 12:49 pm
by Caronte3D
Fred wrote: Wed Feb 05, 2025 9:45 am Deprecated warnings is not an issue.
Ok, I know what the problem was:
We need to save the code before run it, otherwise the loadimage doesn't work.
Maybe should be indicate that on the help example.