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

I am trying to execute a javascript alert message. I have the following script b ut it does not work. on(release) { gotoAndPlay("over"); getURL("javascript:alert('says hi!')"); } There are no problems with the script but there is no alert winjdow popp

Community Beginner ,
Mar 06, 2016 Mar 06, 2016

Copy link to clipboard

Copied

I am trying to execute a javascript alert message. I have the following script b ut it does not work.

on(release) { 

gotoAndPlay("over"); 

getURL("javascript:alert('says hi!')"); }

There are no problems with the script but there is no java alert window popping up either.

Can anybody help me?

Best, C.

TOPICS
ActionScript

Views

1.4K

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
Community Expert ,
Mar 07, 2016 Mar 07, 2016

Copy link to clipboard

Copied

are you testing the published html page in a browser that allows pop-ups?

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
Community Beginner ,
Mar 08, 2016 Mar 08, 2016

Copy link to clipboard

Copied

Yes, I tried that. I unchecked 'block pop-up window' tab for my Safari browser but it still does not work.

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
Community Expert ,
Mar 08, 2016 Mar 08, 2016

Copy link to clipboard

Copied

there's nothing wrong with your code.

try testing in a different browser that allows javascript and popups.

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
Community Beginner ,
Mar 08, 2016 Mar 08, 2016

Copy link to clipboard

Copied

I tried that as well. I tried Safari, Firefox and Chrome with java and pop-up enabled settings. It still does not work. Somewhere I am doing something wrong, I assume. Although the code is correct, nothing works still.

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
Community Expert ,
Mar 08, 2016 Mar 08, 2016

Copy link to clipboard

Copied

try:  http://www.kglad.com/Files/forums/test.html

if you fail to see the popup after clicking the button, you have a browser problem.

if that popup works for you, then download the fla that published the html/swf and see where you're going wrong:  http://www.kglad.com/Files/forums/test.fla

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
Community Beginner ,
Mar 08, 2016 Mar 08, 2016

Copy link to clipboard

Copied

I cannot see the pop-up window. Perhaps there is a problem with the browser. Do I have to put on thaw web? Can't it work at an offline browser?

Could you save your .fla file as a CS5 file? I only have CV5, I cannot see your .fla file which is created in CS6.

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
Community Expert ,
Mar 08, 2016 Mar 08, 2016

Copy link to clipboard

Copied

if you don't see the popup at test, you have a browser problem.  i see the popup.

i resaved as a cs5 file, but i don't see how that will help you because the problem's not in your fla.  it's in your browsers.  you must have popup blocks or disabled javascript.

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
Community Beginner ,
Mar 08, 2016 Mar 08, 2016

Copy link to clipboard

Copied

Well... The problem is that I see the pop-up window on your test file but I cannot see it in my own file. So the browser works with your testy file but does not work with my file. It is all pretty weird, I assume.

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
Community Expert ,
Mar 08, 2016 Mar 08, 2016

Copy link to clipboard

Copied

in message 6 you stated, 'i cannot see the pop-up window' which mislead me.

so the problem is your published file.  now use the fla i sent to publish another html and swf file and test that html file in your browser.  does that work?

if so, create a new fla that contains just a button and that code>publish>does that work?

if so, the problem is in your original fla.

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
Community Beginner ,
Mar 08, 2016 Mar 08, 2016

Copy link to clipboard

Copied

I published your test file. I cannot the alert box in that one either when it is saved on my desktop. However, I was able to see it online. I think the problem should an online/offline issue then or maybe of being a desktop file.


What could such a problem be?

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
Community Expert ,
Mar 08, 2016 Mar 08, 2016

Copy link to clipboard

Copied

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
Community Beginner ,
Mar 08, 2016 Mar 08, 2016

Copy link to clipboard

Copied

If I am to change this global security settings with that online screen, I selected 'Always Allow' and then published the site again. It still does not work. Is there a way to change these settings from the player itself? Or maybe it is another problem.

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
Community Expert ,
Mar 08, 2016 Mar 08, 2016

Copy link to clipboard

Copied

you should add the folder or file that you want to allow.

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
Community Beginner ,
Mar 08, 2016 Mar 08, 2016

Copy link to clipboard

Copied

LATEST

Unfortunately, I tried it but it does not seem to work either. There is a problem with the browser I think but I cannot figure out what it is.

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