6 Replies Latest reply on Aug 2, 2007 3:19 PM by

    Need help with Flash Buttons

    radu.miron
      Hello !

      i'm new to Flash, and have to make a small application in Flash, so I could put it on a site. Tried to modify a .fla i had, so that when i click on a button, another web page should open, at a specific address. I saw that there is a function "getURL(URL,window_type,method)"- as i remember, and it works - if i run the flash file from Macromedia Flash it opens a new page in my browser, BUT....if i put the .swf file in an html page, and open that html page in my browser, and push the buttons in the .swf, I get a security warning, stating that "...the application is trying to connect to the remote location "the_URL_from_getURL()" ..." , and on that security warning window i have 2 buttons: OK and Settings. If i press OK, nothing happens, and if i press Settings, a page from Adobe opens, where I can set my security level. Now, even if i select "Allow all", the next time when i open my html page, and try to push the buttons in the flash animation, i still get the same security warning.

      Now my question is, is there any solution i could try to solve that security warning not to appear every time? , and i saw a lot of flash based sites that had buttons and stuff, and no security warning appearead when i pushed those buttons...a i doing something wrong? :|.
      Sorry for the noobish questions, but if anyone could give me a hand, it'll be awesome!

      Cheers,
      Radu
        • 1. Re: Need help with Flash Buttons
          radu.miron Level 1
          people....please help!!! i beg you...i really need this to get done :(
          • 2. Re: Need help with Flash Buttons
            sbv31
            Hi!

            Don't know if that will help you...???

            Create a button with an actionscript
            btn_inv.onRelease = function(){
            getURL("TYPE_YOUR_URL");
            };

            That works but I don't know how to set the opening of A NEW WINDOW in the browser... probably a blank property?

            Regards.
            • 3. Re: Need help with Flash Buttons
              sbv31 Level 1
              btn_inv.onRelease = function(){
              getURL(" http://www.toto.com","_blank");
              };

              That's the correct code to open A NEW WINDOW.

              Hope that it helps.
              • 4. Re: Need help with Flash Buttons
                radu.miron Level 1
                Thanks for the answer man!

                Finally i realized that when i was pushing the button, the action for that button was to launch www.google.com, and this was not secure (in means of adobe flash). So i tried and modified the actionscript, so when the button was pushed, a local html would be launched (local = in the same folder with the html where the flash was bundled ->this is in my case). And it worked :D. I think that flash does not allow remote connections to other sites (or this is some setting), and if you put there a local html, a html that is on the same server, it will work flawlessly.

                Cheers!
                Radu
                • 5. Re: Need help with Flash Buttons
                  nesmoth
                  hi Radu, that situation happens to me too the other day, but I think that is something about the internet conection,becuase when a test the file in computer with internet acces it works, so you could try it in that way
                  • 6. Re: Need help with Flash Buttons
                    You can not access out of directory files (websites) via flash within your development environment. getURL will work when deployed on the internet or your intranet. If you want to test your file--flash 8 and above--you need to allow web access from your development directory (location in which your swf file resides). Follow the settings link to do this and then click on add permission or what not and then add folder. All this resides in the global security settings tab.