A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 37

Thread: [RESOLVED] get current URL string of browser into SWF

  1. #1
    Generous Newbie
    Join Date
    Apr 2002
    Location
    London, UK
    Posts
    147

    [RESOLVED] get current URL string of browser into SWF

    I have read about several ways to get the URL string of the current browser window into a SWF on that page, THAT DO NOT WORK !

    How, oh please, how do I read the Current URL of the Current Page into a SWF on that page.

    I have 450 different links to that page, and I want the SWF to do an animation based upon which of the 450 links was used.

    The URL is:

    <domain etc>/showMovie.htm?nssMovieName=nnnn

    where "nnnn" is actually a number from 0065 to 1905

    HOW can my SWF know which movie to show based upon the URL info after the question mark ???

    Thanks
    Regards, William Donelson
    Explore the Taj Mahal, India - online VR tour - http://www.taj-mahal.net

  2. #2

  3. #3
    Generous Newbie
    Join Date
    Apr 2002
    Location
    London, UK
    Posts
    147
    All I have is

    page.htm?nssMovieName=nnnn

    I have to get whatever nnnn is set to.


    Why is this so hard? Why can't Flash get the current URL of the current page?
    Regards, William Donelson
    Explore the Taj Mahal, India - online VR tour - http://www.taj-mahal.net

  4. #4

  5. #5
    Generous Newbie
    Join Date
    Apr 2002
    Location
    London, UK
    Posts
    147
    Quote Originally Posted by whispers
    That ref tells how 450 pages -- EACH DIFFERENT -- can call a SWF.

    I have ONE PAGE with 450 LINKS to

    myFlashPage.htm?1244
    myFlashPage.htm?1044
    myFlashPage.htm?0075
    myFlashPage.htm?1004
    etc etc etc

    Each of these 450 links asks the ONE Flash page to please show the animation number "nnnn"

    I am NOT going to make 450 pages with the stupid Embed vars etc etc
    Regards, William Donelson
    Explore the Taj Mahal, India - online VR tour - http://www.taj-mahal.net

  6. #6

  7. #7
    Generous Newbie
    Join Date
    Apr 2002
    Location
    London, UK
    Posts
    147
    I am trying

    foo.text = ExternalInterface("myJavaFunc", "please talk to me");

    but this always returns ---> undefined
    Regards, William Donelson
    Explore the Taj Mahal, India - online VR tour - http://www.taj-mahal.net

  8. #8
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    ?? Im lost here..

    that looks like your calling a FUNCTION?? are you trying to pass a function through a URL?

    I thought all you need is away to put a VAR in a URL and have a FLASH movie pick it up.?? correct? where is this function stuff coming from? right?

    use the javaScript method posted above to embed yo MOVIE in the HTML...this will ALLOW you to pass & retreive VARS in the URL the .swf is embeded in.

  9. #9
    Generous Newbie
    Join Date
    Apr 2002
    Location
    London, UK
    Posts
    147
    When the page loads in the browser, it starts up the Flash SWF. The SWF then does some initialisation, then asks the browser "What frickin' page are you on, and be sure to tell me the ?args as well, thank you". That Javascript function then returns the URL of the current page.

    But I can't even get any of this to work at all

    http://livedocs.macromedia.com/flash...=00002203.html

    I have been Trying to Get the URL of the current page for seven hours now, SH*T.
    Regards, William Donelson
    Explore the Taj Mahal, India - online VR tour - http://www.taj-mahal.net

  10. #10
    Generous Newbie
    Join Date
    Apr 2002
    Location
    London, UK
    Posts
    147
    ExternalInterface.call -- etc etc -- ONLY WORKS IN FLASH 8, not flash 7. Grrrr...


    So, I still need some way for my SWF to get the current URL of the browser window WITH ?args....
    Regards, William Donelson
    Explore the Taj Mahal, India - online VR tour - http://www.taj-mahal.net

  11. #11
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    you need the WHOLE URL..or just a variable from the URL like I thought you originally needed? and NOT from the embed code URL?

  12. #12
    Generous Newbie
    Join Date
    Apr 2002
    Location
    London, UK
    Posts
    147
    AS I HAVE ALREADY SAID IN MY ORIGINAL POST

    My orginal post was PERFECTLY CLEAR. READ IT !!!!!!

    <domain etc>/showMovie.htm?nssMovieName=nnnn

    I need the nnnn from the URL. The nnnn is 4-digit number. Is it NOT part of the <object> or <embed> for the SWF.

    I have stated this as clearly as I know how.

    NOT NOT NOT NOT NOT from the stupid (see above) EMBED code. FOr that I'd need 450 pages instead of one.

    Jeez, are you thick? I HAVE SAID IT OVER AND OVER AND OVER.
    Last edited by Donelson; 05-04-2006 at 08:43 PM.
    Regards, William Donelson
    Explore the Taj Mahal, India - online VR tour - http://www.taj-mahal.net

  13. #13
    Senior Member ryantsi's Avatar
    Join Date
    Sep 2005
    Location
    Exeter, Devon
    Posts
    288

    hey

    I have read your posts, and you are not being that clear, your topic is jumping all over the shop and i got lost at the fith post. Do not burn people for trying to help you, you have come here and asked for help so respect the fact that someone is at least trying.

  14. #14
    Generous Newbie
    Join Date
    Apr 2002
    Location
    London, UK
    Posts
    147
    Quote Originally Posted by ryantsi
    I have read your posts, and you are not being that clear, your topic is jumping all over the shop and i got lost at the fith post. Do not burn people for trying to help you, you have come here and asked for help so respect the fact that someone is at least trying.
    Jeez! I am trying lots of ways to solve this AND REPORTING BACK HERE, not just being quiet like many do. I want others to benefit. But all I am getting is responses which are stupid !

    MY original Question is P E R F E C T L Y clear, thank you very much.

    Why do people respond taking up my time with NO HELPFUL COMMENTS, just stupid time-wasing comments ?

    I have a real, difficult, emergency problem and I don't want to waste my time on all these USELESS comments by people who are NOT PAYING ATTENTION.

    So, Ryantsi, Do you have ANYTHING USEFUL to THIS QUESTION, or are you just going to Rant.
    Regards, William Donelson
    Explore the Taj Mahal, India - online VR tour - http://www.taj-mahal.net

  15. #15
    Generous Newbie
    Join Date
    Apr 2002
    Location
    London, UK
    Posts
    147
    THE QUESTION HERE IS VERY SIMPLE.

    The answer is very difficult.

    I have spent 11 hours now looking for a solution. NOWHERE do I see a way to read the URL of the browser page containing the SWF. Or part of it.

    I am tired of people saying "It's easy, just do this..." which does not work.

    HELP - Answers to MY question Please.

    I will PAY MONEY for an answer to this! (And I will share the answer with all)
    Last edited by Donelson; 05-04-2006 at 08:57 PM.
    Regards, William Donelson
    Explore the Taj Mahal, India - online VR tour - http://www.taj-mahal.net

  16. #16
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    the answer is NOT difficult...now that I am at home.. I did it under 5 minutes you JERK!.. Your just too dumb to figure it out I guess...or look at the HELP (ie: ANSWERS!) given to you... I told you how to do it..twice..you did nt listen..I posted a link to a thread that I just took 5 minutes to read...and did just that..

    made a TABLE in HTML..embeded a FLASH movie clip into one of the cells.. put soe HTML links in some other parts of the table..and with NO PROBLEM AT ALL...changed what movie was playing EACH TIME I CLICKED ONE OF THE HTML LINK!

    your the "bloody" waste of time..you spoon fed clown!! (piss off)

  17. #17
    Senior Member ryantsi's Avatar
    Join Date
    Sep 2005
    Location
    Exeter, Devon
    Posts
    288

    calm down

    i was not going to reply at the risk of prolonging the end of this thread, but if whispers is a time waster by not being able to resolve your absurdly obscure problem,(for free I ad ) then surely you are just as guilty for presenting the problem in the first place. Maybee if you calmed down, had some sleep and tried again tommorow the answer will come to you

    all the best

    Ryan

  18. #18
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    Quote Originally Posted by Donelson
    THE QUESTION HERE IS VERY SIMPLE.

    The answer is very difficult.

    I have spent 11 hours now looking for a solution. NOWHERE do I see a way to read the URL of the browser page containing the SWF. Or part of it.

    I am tired of people saying "It's easy, just do this..." which does not work.

    HELP - Answers to MY question Please.

    I will PAY MONEY for an answer to this! (And I will share the answer with all)
    with your piss poor attitude... I wouldnt even help FOR MONEY! (jerk)..

    noone here wasted your time once.. especially not me..(as noone else bothered to even help you).. YOU refuse to "see the light" clown...maybe those 11 hours should have been better spent learning some manners. cause you cant even figure it out..WHEN GIVEN THE ANSWER! you must need it done FOR YOU!!!!

  19. #19
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    Quote Originally Posted by ryantsi
    i was not going to reply at the risk of prolonging the end of this thread, but if whispers is a time waster by not being able to resolve your absurdly obscure problem,(for free I ad ) then surely you are just as guilty for presenting the problem in the first place. Maybee if you calmed down, had some sleep and tried again tommorow the answer will come to you

    all the best

    Ryan

    ryantsi-

    but the ANSWER was given to him...LOL...thats the funny part..

    out of the kindness of my heart..I'll leave the links there... (he still wont get it)...

  20. #20
    Generous Newbie
    Join Date
    Apr 2002
    Location
    London, UK
    Posts
    147
    Quote Originally Posted by whispers
    WHEN GIVEN THE ANSWER!
    Your "answer" requires that I build 450 separate pages, which I SPECIFICALLY SAID WAS NO SOLUTION.

    Time-waster.
    Regards, William Donelson
    Explore the Taj Mahal, India - online VR tour - http://www.taj-mahal.net

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