A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [F8][Help] Detect current URL

  1. #1

    [F8][Help] Detect current URL

    Hi,

    what is the way to detect in flash the current url it is playing from?
    (not the path of the swf, but the url of the current page)

    for example, i want to be able to do this:
    trace("the page is " + currentPage);

    the result should be: the page is http://www.mysite.com/currentpage.html

    I know it can be done by using something like this:
    window.location

    But I don't know how to make it work.

    Thanks!

    P.S. I only need for simple urls (with no query strings).
    Last edited by SnailsAnimation; 10-15-2008 at 08:11 PM.

  2. #2
    I don't need the answer anymore I've found another way to do what I wanted to do -- Without knowing the url of the page.

  3. #3
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,876
    its always helpful to post back your solutions..that way it may benefit others in the future .. cheers
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

  4. #4
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    well in my footer is a link on how to do it two different ways..

    using .swf object and one using javaScript.

    but Im glad you figured it out.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center