Skip navigation
Currently Being Moderated

Putting a url in a Flash template

Apr 22, 2012 2:01 PM

Tags: #flash #url #actionscript #webpage

Hello. I am working with a Flash template that I bought off the web. I'd like to change the web page the template goes to when certain buttons are clicked. However, I can't figure out how to do it. I found the following action script phrase online that I think does it:


on (release) {


getURL("", "_blank");



But I don't really know how to use that in my template. I tried going to the symbol with the name of the button I want to click, highlighting it, and then entering the above action script command, but it doesn't work. I get the compiler error message:



Symbol=Symbol 18 copy 4, layer=Layer 5, frame=1, Line 1Mouse events are permitted only for button instances



I also tried


on( Release ) {

    getURL( "" );



But that gave the same compiler erros.


Can anyone advise me on how to do this?


Thanks -- Catherine

  • Currently Being Moderated
    Apr 22, 2012 5:36 PM   in reply to Catherine Asaro

    The code you are showing is AS2 code, so either you are posting in the wrong forum or you are trying to use the wrong version of Actionscript.  Based on the error message you are getting, it looks as though you are in the wrong forum... AS3 will not allow code to be placed "on" objects.  You should repost there.


    In any case, if you know the button you want to deal with, the first thing to do is selected with the Actions panel open and see if there is any code "on" it.  Showing that code will be where you can start you new posting if there is.


    If there is no code "on" it, then you should look for an instance name in the properties panel after you select it, and then look thru the code in the timeline to find where it has code assigned to it such as "theBtnName.onRelease = function()...."

    Mark as:
  • Currently Being Moderated
    Apr 22, 2012 7:46 PM   in reply to Catherine Asaro

    You need to work with the version that it is designed with.  If you don't know how to find the version, then open up the publish settings and in the Flash section you will find the AS version it is published for. If it says AS1/AS2, which I suspect it will, that's the forum you need to be posting in.


    If you changed the instance name of the button, you might want to change it back until you get a better idea of what you are dealing with.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points