folders in revlet

Richard Miller wow at together.net
Fri Nov 13 19:31:59 EST 2009


Just change this line:

    set the filename of image 1 to gSlide

to this:

    put url ("binfile:" & gSlide) into image 1

It's the way it has to be for revlets.

Richard Miller



Rick Rice wrote:
>
> 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
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list