PDA

View Full Version : Actionscript & External Links - HELP!


FF50
10-11-2003, 03:51 PM
Hi "Flashers",

I'm beginning to think I picked the wrong movie to learn and practice Flash MX 2004. However, I'm trying to stick with it :h: .

I have a button symbol that I want to open up a text box and also an external link when it is clicked. I dragged the button to the stage and added the following action:

ActionScript:

--------------------------------------------------------------------------------

on (release) {
getURL(mypage.html,_blank);
}


--------------------------------------------------------------------------------

When I tested the movie it returned the following:

**Error** Scene=main, layer=btns, frame=1:Line 1: Mouse events are permitted only for button instances
on (release) {

Total ActionScript Errors: 1 Reported Errors: 1


Can someone tell me why I am receiving this error and how I can correct it?

I am also searching for a tutorial that can tell me how to add a thumbnail photo to a text box that will open an external html page when the photo is clicked.

I am trying to do as much as I can while I have the MX trial before I actually decide on buying it. Any and all help is appreciated.

Thanks,
Foxy:h: :h:

Voetsjoeba
10-11-2003, 03:53 PM
Try changing to AS 1.0. And the correct syntax is like this:


on (release) {
getURL("mypage.html","_blank");
}

FF50
10-11-2003, 04:00 PM
Voetsjoeba,

Thanks for the reply. How do I change to AS 1.0?

Voetsjoeba
10-11-2003, 04:06 PM
When you open a file, you have the document's properties at the bottom of the screen, where the Property Inspector is. There, you can click a button "Settings". A window will pop up in which you can select what AS version to use :)

FF50
10-11-2003, 04:17 PM
Hi.

It is already set to AS 1

Voetsjoeba
10-11-2003, 04:20 PM
**** :P This is one of the reasons I don't like MX 2004.

By the way, are you sure you placed it on a button ? The only reason I can think of causing it not to work ... except mx 2004 complaining about things it shouldn't complain about :a:

FF50
10-11-2003, 04:32 PM
yes it is a button symbol

FF50
10-13-2003, 08:29 PM
Voetsjoeba,

Just looking at the file again. The Property Inspector shows the Publish Setting as Actionscript 1.0. When I view the preferences for the main movie, the language says Actionscript 2.0 settings and I don't see where to change it. When I click on the 2.0 settings all it says is:

$(Local/Data)/Classes

In any case, nothing I have tried from all your responses seems to work (although I really appreciate the help).

Is there a way to upload the file for review so that you can see exactly what is what? It's a Flash MX file that I purchased for my own commercial use and is not to be shared but I guess it's ok to review????

Thanks,
Foxy

Voetsjoeba
10-14-2003, 02:05 PM
You can send me the MX2004 file, or upload it to a server and send me the link through pm, and I'll have a look at it. Don't worry, I won't use your file for anything, I promise :)