folders in revlet

Rick Rice rick-rice at shaw.ca
Fri Nov 13 19:11:30 EST 2009


Just for the heck of it I decided to have a look at Revolution Media  
4.0.0. To this point I have been using Revolution 2.6.1.
The ability to save your stack for the web blew me away. Only one  
problem, I store hundreds of images in separate folders and call them  
into the stack as I need them. This doesn't work in the revlet. I  
imagine many on this list have solved this problem. Could someone  
post the appropriate script so that the revlet can access images  
stored in separate folders.
Thanks
Rick

The way I do it now is:
first I find the folder with the images

on gettheImageList
   global stackaddress, stackpath
   put the filename of this stack into stackpath
   set itemdel to "/"
   If (IsOSX()) then  -- to get Mac path
     get offset(".app/Contents/MacOS/", stackpath)
     if it > 0 then -- 2.4.3 or later
       delete char it to len(stackpath) of stackpath
     end if
   end if
   delete the last item of stackpath
   put stackpath into stackaddress
   put "/urinalysisTestImages" after stackaddress
end gettheImageList

Then I pick an image put it into gSlide and display it like this:

on displayimage
   global gSlide, stackaddress, correctanswer
   put stackaddress & gSlide into gSlide
   set the filename of image 1 to gSlide
   show image 1
end displayimage




More information about the use-livecode mailing list