Skip navigation
Zac.T
Currently Being Moderated

Variable from subdomain??

Sep 30, 2007 11:23 AM

Hi! I saw somewhere a way where a subdomain made a variable in flash. Eg, if i had a site called mysite.com - and anyone can come and put http://blablabla.mysite.com - and a variable on my flash file would be blablabla. Is that possible?

Ps, I use flash 8 with actionscript 2
 
Replies
  • kglad
    72,228 posts
    Jul 21, 2002
    Currently Being Moderated
    Sep 30, 2007 12:48 PM   in reply to Zac.T
    you can use the _url property of your main timeline to return the url of the html page used to load your swf. you can then use the flash string methods to extract the data you want.
     
    |
    Mark as:
  • kglad
    72,228 posts
    Jul 21, 2002
    Currently Being Moderated
    Oct 1, 2007 10:17 AM   in reply to Zac.T
    :

     
    |
    Mark as:
  • kglad
    72,228 posts
    Jul 21, 2002
    Currently Being Moderated
    Oct 1, 2007 11:44 AM   in reply to Zac.T
    that's what you said you wanted in your first message.

    if you want a different portion of the url, check the flash string methods. you should be able to extract whatever you want.
     
    |
    Mark as:
  • kglad
    72,228 posts
    Jul 21, 2002
    Currently Being Moderated
    Oct 1, 2007 12:29 PM   in reply to Zac.T
    yes, use the code i gave but convert the first character of the resulting sub-string to upper case using toUpperCase().
     
    |
    Mark as:
  • kglad
    72,228 posts
    Jul 21, 2002
    Currently Being Moderated
    Oct 8, 2007 12:10 PM   in reply to Zac.T
    what is it?
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 8, 2007 12:31 PM   in reply to Zac.T
    typo I think it should be:

    yourVAr = this._url.substring(this._url.indexOf("//")+2, this._url.indexOf("."));
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points