Re: [Flashcoders] Cross domain AS3

2008-05-30 Thread BlackMail
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


RE: [Flashcoders] Cross domain AS3

2008-05-29 Thread Romuald Quantin
I guess you need a crossdomain.xml file on your server:

http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security.html

Romu

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of SJM
Sent: 29 May 2008 10:12
To: Flash Coders List
Subject: [Flashcoders] Cross domain AS3

Hi Guys

My question; Is it possible in an XML file, to have an absolute link to an
image ie. /banner/flash/uploadedimage/45/sunset.jpg. 

I  need the url to be capable of being absolute and to contain the domain
e.g. http://www.mydomain.co.uk/banner/flash/uploadedimage/45/sunset.jpg

I currently have it set up but the image does not show. It only shows if the
url is relative ie. uploadedimage/45/sunset.jpg

SJM
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Cross domain AS3

2008-05-29 Thread SJM
Hi Guys

My question; Is it possible in an XML file, to have an absolute link to an 
image ie. /banner/flash/uploadedimage/45/sunset.jpg. 

I  need the url to be capable of being absolute and to contain the domain e.g. 
http://www.mydomain.co.uk/banner/flash/uploadedimage/45/sunset.jpg

I currently have it set up but the image does not show. It only shows if the 
url is relative ie. uploadedimage/45/sunset.jpg

SJM
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders