Are you working in one domain (sandbox) ? I so, then probably you need
to fix the relative path. If your swf is stored in some folder ie:
http://www.mydomain.co.uk/banner/flash/MY.SWF
and it needs to load the image from:
http://www.mydomain.co.uk/banner/flash/uploadedimage/45/sunset.jpg
You can pass to getURL() (or whatever you use for loading) a value:
uploadedimage/45/sunset.jpg ... just the way it already like it works for you
1)
If you need the absolute URL then you can use:
var myURL:String = _root._url
Its value will be: http://www.mydomain.co.uk/banner/flash/MY.SWF
(only when on-line)
2)
Next, cut off the swf file:
myURL = myURL.substr(0,myURL.lastIndexOf(/))
trace(myURL); // outputs: http://www.mydomain.co.uk/banner/flash/
3)
...and add you relative path:
myURL += uploadedimage/45/sunset.jpg;
If you SWF is not in a folder directly above the JPG, then you can cut
off more directories in point 2)
g
29 06 2008 (11:11:50) wrote:
SJM Hi Guys
SJM My question; Is it possible in an XML file, to have an absolute
SJM link to an image ie. /banner/flash/uploadedimage/45/sunset.jpg.
SJM I need the url to be capable of being absolute and to contain
SJM the domain e.g.
SJM http://www.mydomain.co.uk/banner/flash/uploadedimage/45/sunset.jpg
SJM I currently have it set up but the image does not show. It only
SJM shows if the url is relative ie. uploadedimage/45/sunset.jpg
SJM SJM
SJM ___
SJM Flashcoders mailing list
SJM Flashcoders@chattyfig.figleaf.com
SJM http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
--
Za co Doda nienawidzi Feel?
Sprawdz http://link.interia.pl/f1e0b
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders