Alright,

I had a theory that if you were to try and load a relative file that didn't
exist, you might be able to catch the path within the
MovieClipLoader.onLoadError() event, by reading the ._url property of the
movieclip that you were trying to load into. This seems to be working fine,
if there is no documented way to read the property, then I will continue
this way.

Here is a preview, notice the swf is being called remotely:
http://lab-media.com/test

This is the code:

var myListener:Object = new Object ();
var servedToUrl:String = "";
var my_mcl:MovieClipLoader = new MovieClipLoader ();
var myListener:Object = new Object ();
myListener.onLoadError = function (target_mc:MovieClip, errorCode:String)
{
    servingUrl = target_mc._url.substr (0, target_mc._url.indexOf
("SomeFileThatDoesntExist"));
};
my_mcl.addListener (myListener);
this.createEmptyMovieClip ("clip1_mc", this.getNextHighestDepth ());
my_mcl.loadClip ("SomeFileThatDoesntExist", clip1_mc);


Thx!
Aaron


On 6/14/06 3:52 PM, "Aaron Buchanan" <[EMAIL PROTECTED]> wrote:

> I am doing some flash ads and was trying to find out if there is a property
> that I can read the url of the html page that called my current .swf file.
> 
> I know that MovieClip._url will tell me where the .swf file's sitting, but
> what do I read for the serving page's location?
> 
> Thx!
> Aaron
> 
> 
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> 
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com


_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to