Skip to main content
Participant
June 8, 2022
Question

Screen displaying blank after adding button in browser

  • June 8, 2022
  • 2 replies
  • 120 views

I am creating a simple banner add with a button covering the screen. I added the action Click to Go to Web Page to the button.. When I add the action the screen displays blank. When I remove the action the screen shows again but the button does not work. This is the action script that automatically adds when I double-click

Click to Go to Web Page

/* Click to Go to Web Page
Clicking on the specified symbol instance loads the URL in a new browser window.

Instructions:
1. Replace http://www.adobe.com with the desired URL address.
Keep the quotation marks ("").
*/

button_2.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage_4);

function fl_ClickToGoToWebPage_4(event:MouseEvent):void
{
navigateToURL(new URLRequest("https://www.ussoccer.com"), "_blank");
}

Please help. I'm very frustrated.

    This topic has been closed for replies.

    2 replies

    Participant
    June 8, 2022

    I found the answer here

    https://community.adobe.com/t5/animate-discussions/adding-simple-script-causes-testing-and-publishing-problem-blank-screen-with-nothing-showing/td-p/12980571

    Now just like the other user I feel silly. I was using ActionScrupt instead of html5 actions.

    kglad
    Community Expert
    Community Expert
    June 8, 2022

    well, the correct answer is here too.

    kglad
    Community Expert
    Community Expert
    June 8, 2022

    you're creating an as3 banner ad???