4 Replies Latest reply on Mar 3, 2010 6:18 AM by kglad

    Is there a way to get a relative url from a ._url call?

    ankhcomm

      Basically I have some movie clips with external images that were placed in them with a MovieClipLoader. I want these clips to toggle the image they're showing when clicked. However, the only way I know how to tell each image is loaded in them is by way of their ._url method (basically each click will return the url of the image and if it's the url for the current image, I'll place the alternate image in there). However, that gives me an absolute URL. I could use this for prototyping, but once it's deployed, it won't do any good to match it with my local testing url; I need to use a relative url, just like when I originally used the MovieClipLoader to place the images.

       

      If that can't be done, is there a way to return the current url that the swf is playing from? That way I can put that into a variable that I can use for evaluating the source url to know which image should be in the movieclip whenever it's clicked.