HyperNext Studio

HyperNext Studio => General => Topic started by: venkat0249 on October 04, 2011, 03:44:43 PM

Title: "slide show" project not working
Post by: venkat0249 on October 04, 2011, 03: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.
Title: Re: "slide show" project not working
Post by: Malkom on October 07, 2011, 06: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.
Title: Re: "slide show" project not working
Post by: venkat0249 on October 07, 2011, 12:30:59 PM
thank you malkom... :D :) :)