Author Topic: "slide show" project not working  (Read 2580 times)

venkat0249

  • Newbie
  • *
  • Posts: 22
"slide show" project not working
« on: October 04, 2011, 02:44:43 PM »
Hai...
one of the example HN projects, "SlideShow", was no working properly. Its not displaying images in canvas. kindly once check the code and update the project or tell the modifications that i have to do in that.

Malkom

  • Administrator
  • Newbie
  • *****
  • Posts: 405
  • Here to help you
Re: "slide show" project not working
« Reply #1 on: October 07, 2011, 05:30:52 AM »
Hai...
one of the example HN projects, "SlideShow", was no working properly. Its not displaying images in canvas. kindly once check the code and update the project or tell the modifications that i have to do in that.
Sorry for the late reply.

The SlideShow uses that buggy CanvasLoadAbs command.

Here is a workaround for SlideShow that simply replaced CanvasLoadAbs with a user defined MyCanvasLoadAbs:-


1) In the card timer - replace CanvasLoadAbs(1,fname,1) with MyCanvasLoadAbs(1,fname,1)

2) In the MainCode section create a new procedure called MyCanvasLoadAbs, with parameters, cid, fname, scale

Code: [Select]
local fname1,fname2,fnameloc,f1,f2,fx

Put fname into fname1

@ Original
FolderItemGetAbs(fname1,f1,fx,fx,fx,fx,fx)

@ Local
Put 'temp.jpg' into fnameloc
Put MyFolderFN into fname2
Append '\' onto fname2
Append fnameloc onto fname2
Put fname2 into field 2
FolderItemGetAbs(fname2,f2,fx,fx,fx,fx,fx)

@ Copy to local
FolderItemCopy f1,f2

CanvasLoad(cid,fnameloc,scale)

FolderItemDelete(f2)

Basically it just copies the image to a temp file temp.jpg, loads it inot the canvas, then deletes the temp file.
I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

venkat0249

  • Newbie
  • *
  • Posts: 22
Re: "slide show" project not working
« Reply #2 on: October 07, 2011, 11:30:59 AM »
thank you malkom... :D :) :)