Skip to main content
Participant
Oct 17, 2022 10:02 PM UTC
Question

Error 1120 : Access of undefined property window

I keep getting the following error:

This is the code I have:

 

this.button_1.addEventListener("click", fl_ClickToGoToWebPage);

function fl_ClickToGoToWebPage() {
window.open('http://www.adobe.com', '_blank');
}

 

I am trying to save as mp4 (Its not saving either)

 

 

    This topic is closed to new replies. Start a new post to keep the conversation going.

    5 replies

    Colin Holgate
    Inspiring
    Oct 17, 2022 10:10 PM UTC

    I copied your code into a new HTML5 Canvas FLA (and made a button with the right name), and it worked fine. Are you using an HTML5 Canvas FLA?

    When you said save as mp4, did you mean export to video? If you're animating to export to video, using an ActionScript 3.0 FLA would give you more features and better quality.

    Translate
    Participant
    Oct 17, 2022 10:41 PM UTC

    I have no idea - I have not used animate before. I am using files someone else created and it looks like they saved them as .mp4. 
    Yes. I tried to export to video. The files will be used as banners for display ads.

     

    Translate
    kglad
    Community Expert
    Community Expert
    Oct 17, 2022 10:06 PM UTC

    you need to use an html5/canvas project to use javascript code, or use as3 code with an as3 project.

     

    p.s. the better url is https://www.adobe.com

     

    p.p.s. mp4's are not interactive so it makes no sense to code a button (or anything else) in a video.

    Translate
    Participant
    Oct 17, 2022 10:52 PM UTC

    I created a new documet thats an html 5 project. Its still giving me the same error.

     

    Translate
    kglad
    Community Expert
    Community Expert
    Oct 17, 2022 10:54 PM UTC

    that doesn't make sense. there is no 1120 error in canvas. that's an actionscript error.

     

    in fact, you can't even test a canvas project in animate. you tesf in your default browser.

    Translate