Skip to main content
Known Participant
Dec 14, 2023 2:19 AM UTC
Question

Exit button undefined property

I made an exit button in adobe animate as 3 for publish android. The exit button uses coding

stop();
btnya.addEventListener(MouseEvent.CLICK, closeapp);
function closeapp(e:MouseEvent):void
{
NativeApplication.nativeApplication.exit(0);
}

 but access of undefined property nativeApplication. Do i have to name it anywhere?

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

3 replies

kglad
Community Expert
Community Expert
Dec 14, 2023 2:43 AM UTC

import the class.

Translate
Known Participant
Dec 14, 2023 3:21 AM UTC

how to import the class? Please help my final year project

 

Translate
kglad
Community Expert
Community Expert
Dec 14, 2023 11:35 AM UTC

import flash.desktop.NativeApplication;

Translate