ActionScript 2.0 :: How To Find Domain Name
May 3, 2006Once a swf is loaded on a server,can any variable inside can tell me the domain name and the directory in which it is present
View 3 RepliesOnce a swf is loaded on a server,can any variable inside can tell me the domain name and the directory in which it is present
View 3 RepliesI have tryed some solutions but I can't make anything work.
Can anyone tall me some sample code to display the domain where flash is running.
I'm working on file transfer application where client sends files to cpp server. At client side I can give the server's domain name but not IP address cuz it may vary. How can I get my server's IP address through it's domain name. I have to put this logic into air application.
View 1 Repliespost the code for a working cross-domain securityfile that allows access only from the same domain as all the flashfiles and xml files are in?used to be easy in as2 but i think i dont know what i need to know about it in as3..
View 3 RepliesWe are running FMS3 on Windows 2003 Server. Videos stream and play fine when inside our domain, but outside the domain the videos take anywhere from 20 or more seconds before playing.
After analizing the connections it was determined that the player is randomly trying to access ports until it gets to the one that works, but this is ONLY happening from people trying to view videos from outside our domain.
I have moved a web application from old domain to new domain. I cannot get Flash to engage. I have changed the domain in flash_images.php file to the new domain. I have a flash_box.swf file and I have a js file these are the only flash components that I see--old domain is e.g. www.example.com new domain is [URL]..I am not a flash developer, how do I get flash to work on the new domain?
View 3 RepliesI created some game and would like to let the users play it only on my domain, so to forbid to play it offline or put on some other site. Is there a way to do it? Somehow check domain or so?
View 1 RepliesMy swf works fine when previewed locally but because of flash cross domain issues (link below) doesnt work live. [URL] Ive used a 'crossbrowser.php file to .load in xml but am not having success with the sendAndLoad command. [URL]
View 3 RepliesI must rejected all users outside Denmark from our live streaming (c-ip) and this is done in an access plug-insBut now I need to open up one of the streams, but I can't get the streaming name in the access-plug-ins only in the Auth-plug-ins.I cant use x-page-url or s-uri I need pStreamName. in access-plug-in like thissetStringField(m_pAev, IFmsAuthEvent::F_STREAM_NAME, pStreamName);but I cant get it inside the access-plug-in
View 1 RepliesI have a .swf in a index.html, in a domain: [URL]My question is simple: Using Actionscript 3.. how I know the name of the domain where my .swf file is hosted?
View 1 RepliesI know how to get the URL of the page, but how can I extract simply the domain and the domain alone? It must return the same value with or without www, and it must also return the same value regardless of file, with or without trailing slash, etc.
So[url].... would return [url]...., and [url]......... would return the same as well.Is this possible?If so, is there a way to do it without calling ExternalInterface.call('window.location.href.toString')?
[url]...
According to the documentation outlining the facebook sharer.php, in order to post flash inline I need to add my domain to the facebook whitelist. However, I can find no information detailing the procedure to accomplish this.
Is it possible for a swf to get info from an XML file that is placed in a different domain? And if it is, how can I do it?
View 3 Repliesi've done just about everything i can think of to load an external .swf located on a different domain.i have the crossdomain.xml file that reads like this:[code]my .swf is working when i test it offline, but when i upload it to another server, it completely fails at loading any external swfs.
View 5 RepliesThis is the code I want to use to direct a user to a different web page-
function linkToBiblioteca(event:MouseEvent) {
var request = new URLRequest('www.biblioteca.buap.mx');
navigateToURL(request,"_blank");
}
- but it trys to open inside of my directory. How can I avoid this?
Maybe this a recurrent issue in almost every Flash forums,but theres something that continues to miss me. I'm confortablewith AS2 and programmed some access for xml feeds with it, but theAS3 is giving me a fight for it.I want to be able to read a RSS feed from a newspaperwebsite. Everything is going well if the movie is running insideFlash, but outside it's not (I know that this has to do with thesecuruty level, that is minimal at runtime).I've seen all kind of solutions, but none of them doesn'twork so far. Has a "not very familiar" with AS3 person,, with a example of crossdamin.xml and the"Security.allowDomain" command so that I can get that RSS with noproblems.1) do you think it's a good ideia to have a TimerEvent totrigger the reloading of such RSS?2)In what circumstances does the <img> works in a
View 2 RepliesI am building a flash AS3 movie for a client that uses a facebook-connect authentication then loads some dynamic xml and plays.At the last minute the client has informed me that they actually need the flash movie and assets to reside on an external server, so the flash and the xml are not going to live on the same domain.I have the added problem that the xml comes from a PHP file with a session that has been authenticated, so I don't really have the option to use a proxy PHP include to make this work (I believe the session would be broken)
View 2 RepliesIs it possible for SWF to call a php file from another domain, even without a cross domain policy on the other domain computer?
View 1 RepliesIs there some way to secure nearly expired domain name.
View 1 RepliesI have a flash that loads from an rss feed (xml). It works great if i putt (www + my domain dot com) in the url, but wont load the data if I just use mydomain dot com (without the www). I have heard of crossdomain.xml.
[Code]...
I have a swf movie player located in [URL]. Normally this a.swf is used by a html page, the swf file is embedded in a [URL]. The website is not built by me but I know there is a restriction that only the html in [URL] can play the video . Now what I want to do is embed the a.swf into a c# project using swfloader, I will set the source property of swfloader to [URL]. My question is will the c# project be able to play to video file the same as in the html page?
View 1 RepliesI am trying to load an xml file from wikipedia into my flash movie.
loader = new URLLoader();
loader.addEventListener(Event.COMPLETE, tweetLoaded);
loader.load(new URLRequest("http://en.wikipedia.org/w/api.php?action=query&rvprop=content&format=xml&pageids="+subNum));
loader.addEventListener(IOErrorEvent.IO_ERROR, onIOErrorFunction);
This works fine when the flash file is run locally but when I upload to my domain it does not seem to work. I have read elsewhere that the cross domain rule does not apply to XML files only to images and other media. Is this true? If not is there a work around so that I can load in XML files from domains other than the one the swf is hosted on?
Okay I am really confused, my program queries both Bing API and the media wiki API. The Bing api call works fine, I can retrieve the XML search results back from it fine. But the wikipedia call does not work (online). I have tried listening for the Security_Error on the wikipedia call but it does not fire.
I'm successfully loading swf from another domain, but when i addChild loaded content, it doesn't appear on the stage. My firebug shows that swf loaded with status (304 Not Modified), means no problem.
Why i cannot see loaded swf content on the stage?
I'm trying to load swf like this:[code]but the problem is that some of the swf are in AS2 and their script don't excute (a simple stop() on the last frame is not executed and the movie loops)If I remove loader_context.securityDomain= SecurityDomain.currentDomain;it works, the AS2 files scripts are executed but flash throws a security error for the swf that come from a different domainSo I'm wondering if there is a way in an AS3 file to load AS2 swf from another domain ?
View 1 RepliesRegexp for AS3 to get the domain name from URL?[URL]
View 2 RepliesWhen trying to load a swf from a domain different from my swf's domain, I get this error[code]...
View 2 RepliesI want a SWF to load an XML file that is on another server. Just for this example: swf is on [URL]. And my XML code is like this:
ActionScript Code:
function xmlLoaded(success){
if (success){
_root.myText_txt.text = myXml.firstChild.nodeName;
[Code] .....
The problem is, as soon as the XML is not on the same domain as my SWF it can't load the XML.
I'm building a flash wrapper that can load external swf files and display some info over top of them. It's 99% working now except for one very weird and frustrating issue. If I try to load an .swf file from a different domain I cant see it. It loads, I can see it loading in firebug. It plays, because if there is sound in the swf I can hear the sound, but it cant be seen or interacted with (as if all the display assets are being set to visible=0). If I load an swf from the same domain then it works fine and the files can be seen. I can also load from different domains in local testing, just not live online.
I have security.AllowDomain('*') but that doesn't help. The file is loading but it's not visible.
What's most annoying is that it wasn't always behaving like this, it was loading them fine before but it stopped at some point but I've gone over the code 1000 times now and tried removing anything and everything that I might have added that could cause this.
I am trying to play an FLV in a FLVPlayback Component by setting the contentPath variable in AS. The code has been working fine with various local FLVs (using relative paths), but during I test I was trying to conduct I tried to call an FLV on a remote server and ...The FLV never loads. When I'm running it from within Flash CS4 it just sits there (i.e. no error message) and eventually crashes the application. When I run the SWF that calls the FLV from a browser it just sits there and there is no indication from the network traffic that it even tries to call the FLV.
Again, local files (using relative paths) work fine. I thought it could be a crossdomain issue, but the same file is called from within a different SWF on a different location on the same site without any issue. I thought maybe it was the FLV itself, but if I call the same FLV locally, it works fine. I thought maybe it was a problem calling an FLV with an absolute path but I tried calling a file from my personal (localhost) server and it works fine. Unfortunately I can't provide a link to my files because they are proprietary.
I have a flash file that uses actionscript to read a remote XML file. [URL] for the tutorial that allowed me to accomplish this. Everything is working pefectly except one little issue.
When the movie loops it requests the XML file again. How can I have it request the XML file only the first time and just re-utilize the data?