Results 1 to 7 of 7

Thread: update URLs

  1. #1
    Join Date
    Jun 2010
    Posts
    45
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default update URLs

    Hello all

    I have this code, how do i update the URL's?

    Code is attached

    Help

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I looked through the file quickly and as far as I can tell there is only one URL. I don't understand what you mean about changing it-- just locate the part that starts with "HTTP" and change the address to whatever you'd like.
    There are variables in the URL, so you will need to program the new receiving page to also accept these variables, but that's a secondary issue, something you will need to work out with PHP or whatever serverside language you'll be using.

    If you need help, you need to give us more information. We can't help you without knowing what is going on.


    And based on the nature of the question, can you please confirm that you have permission to use this? I don't understand why you would be using this if you don't understand it, since it must have been created by someone who knows Flash well.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Jun 2010
    Posts
    45
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Hello

    Thanks for you response, firstly i am allowed to use it but my flash knowledge is very basic I'm a CSS guy and flash is not my thing.

    I am building a new website where i work and the flash movie is a small part of it all.

    But to be honest i don't understand Actionscript that well, and what i need is the links in the movie to go to other pages and don't have a clue where to start.

    I took this on because it was changing links, just didn't relise how complex it was.

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Open the file in a text editor. Search for "http". There is only one match. Change that URL to whatever you need, leaving the variables at the end as they are. Then write a serverside script to deal with the incoming variables.

    Find:
    Code:
    var int = setInterval(function() { clearInterval(int); getURL("http://hospital.gosh.org/children/general-health-advice/body-tour/bones-and-joints/?xpos="+body._x+"&ypos="+body._y); }, 1200);
    Replace:
    Code:
    var int = setInterval(function() { clearInterval(int); getURL("http://MYNEWURL/?xpos="+body._x+"&ypos="+body._y); }, 1200);
    The loaded page will be in the format http://MYNEWURL/?xpos=X&ypos=Y. X and Y will be numbers.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. The Following User Says Thank You to djr33 For This Useful Post:

    jelly46 (10-05-2011)

  6. #5
    Join Date
    Jun 2010
    Posts
    45
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks mate

  7. #6
    Join Date
    Jun 2010
    Posts
    45
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    hello djr33

    I can see what you've done here but its still not working for me i shall explain.

    The urls have all changed and i think what is causing me a problem is this line:-

    var int = setInterval(function() { clearInterval(int); getURL("http://hospital.gosh.org/children/general-health-advice/body-tour/bones-and-joints/?xpos="+body._x+"&ypos="+body._y); }, 1200);

    and this line, and i dont know what to do, because the new site they are going in not a static HTML page.

  8. #7
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I don't understand. Change the URL in that line to the new page. Then, as I have said before, you must make that page receive the information in the URL.

    So you will get:

    newpage?xpos=5&ypos=4
    or
    newpage?xpos=10&ypos=50

    And you must handle that in the new page. That's not part of what the flash object is doing.

    You could decide to load different links based on what is clicked (if x=5, load this page; if y=3, load this page; etc), but that would be more complicated in the SWF and in my opinion it's easier to edit a serverside language for maintenance than modify the SWF repeatedly.


    The first step is very very simple: change that URL.

    The second step is more complicated: use a serverside language to decide what to do based on those numbers.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

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