Load image error (deprecated?)

Just starting out? Need help? Post your questions and find answers here.
User avatar
Caronte3D
Posts: 189
Joined: Sat Nov 23, 2019 5:21 pm
Location: Some Universe

Load image error (deprecated?)

Post 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")
Fred
Site Admin
Posts: 1820
Joined: Mon Feb 24, 2014 10:51 am

Re: Load image error (deprecated?)

Post by Fred »

Deprecated warnings is not an issue.
User avatar
Caronte3D
Posts: 189
Joined: Sat Nov 23, 2019 5:21 pm
Location: Some Universe

Re: Load image error (deprecated?)

Post 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.
Post Reply