Forgot to embed fonts. The variable servedToUrl, defined on line 2, was a typo, should have been servingUrl, which is what was embedded into the textfield and being set from the onLoadError event.
I moved the test into a more permanent place and uploaded the flas, incase anyone wanted to take a look. DEMO: http://lab-media.com/transfer/chattyfig/swf_served_url/ SOURCE: http://lab-media.com/transfer/chattyfig/swf_served_url/source.zip Thx! Aaron On 6/14/06 8:17 PM, "Jameson Hsu" <[EMAIL PROTECTED]> wrote: > Aaron, > > I don't think that your example is working. The "This ad is being served > to" field is empty in your example. Also your variable "servedToUrl" isn't > being utilized in the code that you provided. > > Did I overlook something? > > Jameson > > > > On 6/14/06, Aaron Buchanan <[EMAIL PROTECTED]> wrote: >> >> 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 >>> >>> >>> _______________________________________________ >>> Flashcoders@chattyfig.figleaf.com >>> 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 >> >> >> _______________________________________________ >> Flashcoders@chattyfig.figleaf.com >> 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 >> > _______________________________________________ > Flashcoders@chattyfig.figleaf.com > 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 _______________________________________________ Flashcoders@chattyfig.figleaf.com 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