2 Replies Latest reply on Jun 1, 2008 9:21 AM by Joao Estima

    modifying getURL

    Joao Estima
      I have several movies done in flash 6 as1 that call getURL to play sound files. Is there any way I can create a new movie that loads those old movies and changes the flash getURL function, so everytime getURL is called it runs my own getURL function.

      Currently getURL on those flash6 as1 movies call the file:
      getURL("soundFile.mp3"); - which breaks on the browser.

      and my own getURL function would get the url string, like this:

      function getURL(str:String){
      // loads sound
      }

      My goal is to detect every getURL call that is made in the flash movie, before it does anything.

      Can someone help??
        • 1. Re: modifying getURL
          clbeech Level 3
          nope - won't work. the name 'getURL' is a 'reserved word' specifying that method at the top level classes in flash - you cannot name another methods the same. you will need copy the movies into a new document and change the code in those places to load a SoundObject with the source file, as in:
          • 2. Re: modifying getURL
            Joao Estima Level 1
            Thanks for your help.
            I have a shockwave movie that loads those flash interactions and changes the getURL top level class, so when getURL is called on those movies it runs the function I have on the shockwave loader, but with the release of shockwave player 11 I started getting problems, so I'm looking for a solution in flash that does the same.
            My problem is that I have hundreds of those flash interactions with the getURL issue, and it would take me forever to change them all =S

            Can I define a new getURL class in a package and use import to bring the class to the loader so it over right the getURL top level class? But how can I do that..

            Thanks!