Absolute URLs

John Cuccio jcuccio at pacbell.net
Wed Jan 23 21:14:01 EST 2002


>Hello again!!:)

>I've encoutered a serious problem wich is a real enigma for me actually (the
>thirs today!!!). The url of the images or other imported medias are
>qualified as absolute. I mean that their url is displaiyed like this:
>HardDriveName/Desktop folder/Name of the folder/ etcŠ (i'm working on a mac)
>The problem is that when i need to work on another mac with a copy of my
>entire project (in fact the folder containing the stack and all the medias)
>none of the medias is found! The problem would be the same in GoLive when
>you specify that a link to a file is absolute but the default setting is to
>qualify normaly urls. How is it possible in Rev?

>Cordialy,

Here is how I do this.
If the folder of the info never changes but the name of the hard disk does.
If use get the filename of the stack it returns the path where the stack is
located. Then change the itemdelimiter to "/". Then item 2 is the name of
the hard disk. Then put the pieces of the info together to get the path. I
call my from a function. but you could store this at start up in a field or
var.


on something
put the filename of this stack into hdname
put "/desktop/image/" into imagepath
set the itemdelimiter to "/"
put item 2 of hdname into hdname  --this gives you the HD name
put "file:"&hdname&imagepath into filepath
put url filepath into some palce
end something



More information about the use-livecode mailing list