Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
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

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

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

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

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

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

there's nothing wrong with your code.

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

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

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.

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

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

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

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.

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

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.

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

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.

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

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.

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

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?

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

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.

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

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

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

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