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

Button (email) ERROR!!

New Here ,
Jul 23, 2013 Jul 23, 2013

Hi,

Im making a web and I have a problem with one button. I want to this button when you will do clic on it; Outlook or similar program open a new eamil with my adress.

I put this code in my action:

on (press) {

getURL("mailto:tumail@tumail.com", "", "POST");

}

But don't work. Appear a ERROR MESSENGER "Error 1086"

Thnx.

Andrés

TOPICS
ActionScript
1.9K
Translate
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

correct answers 1 Correct answer

LEGEND , Jul 23, 2013 Jul 23, 2013

I'm still not clear on where you are putting that code.  For that type of code you need to select the button on the stage and then enter the code in the Actions panel.

A better way to code the button is to place it in the timeline where the button lives instead.  To do that, select the button on the stage and give the button an instance name in the Properties panel where it says <Instance name>... let's san you name it "btn"

Then create a layer in the timeline for actionscript.  If the button is i

...
Translate
LEGEND ,
Jul 23, 2013 Jul 23, 2013

What is the entire error message?

Where are you putting that code, in the timeline or on the button?

Translate
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
New Here ,
Jul 23, 2013 Jul 23, 2013

Hi.. thnx for ur repley.

First of all im new with Flash I only use it for put all my Photoshop layers and make my buttons

First I’ve made my button after it, I went to go Scene and I did clic (only 1) in my button layer, later press F9 and put the code

The error message is “Escena 1, Capa ‘Contactame’, Fotograma 1, linea 1, columna 12 1086: Error de sintaxis: se esperaba un punto y coma antes de leftbrace.” in English the message is “"Scene 1, Layer 'Contact me', Frame 1, line 1, column in December 1086: Syntax error: expecting semicolon before leftbrace."

If you want I cant send u the file. I think the problem is easy, but i havent enough experience in it.

Thnx

Andrés

Translate
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 ,
Jul 23, 2013 Jul 23, 2013

Try changing the first line to not have that space between on and the parentheses, and use release instead of press...

on(release) {

Translate
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
New Here ,
Jul 23, 2013 Jul 23, 2013

Done, and don’t work. The same error.

Translate
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 ,
Jul 23, 2013 Jul 23, 2013

I'm still not clear on where you are putting that code.  For that type of code you need to select the button on the stage and then enter the code in the Actions panel.

A better way to code the button is to place it in the timeline where the button lives instead.  To do that, select the button on the stage and give the button an instance name in the Properties panel where it says <Instance name>... let's san you name it "btn"

Then create a layer in the timeline for actionscript.  If the button is in the first frame of its layer, then select the first frame of the new actions layer and enter the following code in the Actions panel...

btn.onRelease = function(){

      trace("btn works");

      getURL("mailto:tumail@tumail.com");

}

The trace function inside the the button function should be removed but it is there for now to help make sure that the button is executing the function.

Translate
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
New Here ,
Jul 23, 2013 Jul 23, 2013

Yes. I put the first code in stage.

I tried your suggestion but i dont know how do it well. I've tried it but dont work :S


Translate
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 ,
Jul 23, 2013 Jul 23, 2013

The first code you showed does not go in the stage.  As I mentioned in my last response for the original code you select the button and then enter the code in the Actions panel.  That way the code is attached to the button.

If you describe what you did for the other way maybe I can see where you missed something.

Translate
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 ,
Jul 23, 2013 Jul 23, 2013

Here is a link to a file that show both approaches to making the button work. 

http://www.nedwebs.com/Flash/AS2_button_coding.fla

The file has been tested, so if it does not work for you, the problem is not with the file.

Translate
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
New Here ,
Jul 24, 2013 Jul 24, 2013

If u try this file http://www.nedwebs.com/Flash/AS2_button_coding.fla

DONT WORK. appear 2 errors.

I have other 2 bottums with goto others web, and it works, but the problem is with this buttom for email.

Translate
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 ,
Jul 24, 2013 Jul 24, 2013
LATEST

As I already indicated, the file I provided has been tested and it works.  The problem is not with the file - it is something with your system/software.

Translate
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