Highlighted

strange behavior of alert message JSFL Actionscript

Community Beginner ,
Apr 27, 2020

Copy link to clipboard

Copied

I have an SWF extension panel and the issue appears when I try to show an alert if the user selects another document in Animate. It shows many many times, and I can't figure out why..
jsfl code:

 

var docChangedID = fl.addEventListener( "documentChanged", onDocumentChangedHandler );
function onDocumentChangedHandler(){
     var panelChange = fl.getSwfPanel("mySWFpanel", false );
	panelChange.call( "changeDoc" );
}

 

 AS code:

 

ExternalInterface.addCallback('changeDoc', this.enabledList );
function enabledList() : void {	
		list.dataProvider.removeAll();
	MMExecute("fl.trace(\"you are change FLA file\");");
	MMExecute('alert("you are change FLA file");');
	//MMExecute('fl.runScript(fl.configURI + "/WindowSWF/mySWFpanel.jsfl", "showAlert");');
}

 

Views

91

Likes

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

strange behavior of alert message JSFL Actionscript

Community Beginner ,
Apr 27, 2020

Copy link to clipboard

Copied

I have an SWF extension panel and the issue appears when I try to show an alert if the user selects another document in Animate. It shows many many times, and I can't figure out why..
jsfl code:

 

var docChangedID = fl.addEventListener( "documentChanged", onDocumentChangedHandler );
function onDocumentChangedHandler(){
     var panelChange = fl.getSwfPanel("mySWFpanel", false );
	panelChange.call( "changeDoc" );
}

 

 AS code:

 

ExternalInterface.addCallback('changeDoc', this.enabledList );
function enabledList() : void {	
		list.dataProvider.removeAll();
	MMExecute("fl.trace(\"you are change FLA file\");");
	MMExecute('alert("you are change FLA file");');
	//MMExecute('fl.runScript(fl.configURI + "/WindowSWF/mySWFpanel.jsfl", "showAlert");');
}

 

Views

92

Likes

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
Apr 27, 2020 0

Have something to add?

Join the conversation