• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Putting a url in a Flash template

Guest
Apr 22, 2012 Apr 22, 2012

Copy link to clipboard

Copied

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) {

_url;

getURL("http://www.catherineasaro.net/scienceFiction.html", "_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( "http://www.catherineasaro.net/scienceFiction.html" );

}

But that gave the same compiler erros.

Can anyone advise me on how to do this?

Thanks -- Catherine

TOPICS
ActionScript

Views

983

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 22, 2012 Apr 22, 2012

Copy link to clipboard

Copied

Added note: There must be some actionscript somewhere that defines what the button already does. If I can find that script, I can change it.

So added question to the above: how to I find the actionscript a button in the template is already using? I don't seem to be able to do it.

This template is pretty complicated, and the names of a lot of the things are similar (symbol copy 1, symbol copy 2 etc). So any tips people have for locating elements would help.

Also, I'm using  MacBook Pro.

Best -- Cat

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 22, 2012 Apr 22, 2012

Copy link to clipboard

Copied

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()...."

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 22, 2012 Apr 22, 2012

Copy link to clipboard

Copied

Ned, I can run either AS3 or AS2. I got that code I put above off the web, so that may be why it isn't working. But I can't figure out how to see the AS code on the object. I know something is there because when I click on the link of the web page that the template makes, it switches to another page, one that came with the template. I'd like to change it so that it switches to a page already at my web site. I already changed the name of the button, and that worked fine. But I can't find the durn code. I tried various suggestions I found online for finding what actionscript code is associated with a movie-clip button, but none of those suggestions show me anything.

I just tried what you suggested above, but it gave me the same results as the previous times. It shows me a blank panel. The top of the menu on the left of that panel allows me to choose either AS3 or else ASC1 & AS2. Then it has a lot of options below which, quite frankly, I don't understand.

I'm not sure what you mean by the properties panel. When I right-click on the movie clip, I do get properties, but it has almost nothing on it except the name of the symbol that I've already selected, that symbol that gives me the button when I run a test of the template.

In any case, I can't for the life of me find any AS code in the timeline.

Any help you can give would be much appreciated.

Best -- Cat

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 22, 2012 Apr 22, 2012

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 22, 2012 Apr 22, 2012

Copy link to clipboard

Copied

LATEST

Aha! Yes, its says AS2. I will go over to that forum. Thanks -- Cat

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines