--- In [email protected], "shivkxr" <[EMAIL PROTECTED]> wrote:
>
> I need to get the domain the Flex app is running in.
> 
> My is hosted at aaa.com
> A page on bbb.com embeds my app on their page.
> 
> At runtime I need to know that my app is running on bbb.com
> 
> I've tried LocalConnecition.domain but that gives me aaa.com.
>

Hi, shivkxr

I'm a newbie in FLEX, I've a same problem with you.
After reading this thread, I found very easy soultion.
This solution can get referer url of swf file posted.

You can use PHP or ASP url in object tag's movie parameter(or embed 
src) like this.
-------
<object type='application/x-shockwave-flash'
        width='760px' height='450px' align='middle'
        classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'
        
codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/sw
flash.cab#version=8,0,0,0'>
        <param name='movie' value='http://SERVERURL/viewer.php?
Key=ABCDEFG' />
        <param name='allowScriptAccess' value='always' />
        <param name='allowFullScreen' value='true' />
        <param name='bgcolor' value='#000000' />
        <embed src='http://SERVERURL/viewer.php?Key=ABCDEFG'
                width='760px' height='450px'
                allowScriptAccess='always' type='application/x-
shockwave-flash'
                allowFullScreen='true' bgcolor='#000000' >
        </embed>
</object>
-------

and viewer.php can redirect location of swf file.
-------
viewer.php
-------
<?
$referer = urlencode($_SERVER['HTTP_REFERER']);

header( 'Location: http://SERVERULR/viewer/viewer.swf?
&eurl='.$referer.'&Key='.$Key) ;
?>
-------

I think, it's a BEST solution can get referer url without javascript 
access in flash.

Thanks,

Junshik Jeon.


Reply via email to