Skip to main content
Chaint
Known Participant
April 30, 2023
Question

Unable to adjust panel height via buttons

  • April 30, 2023
  • 2 replies
  • 680 views

I want to adjust the height of the swf panel by a button in the swf panel plugin, the following code doesn't seem to work

high200.addEventListener(MouseEvent.CLICK, onBtnClick);

function onBtnClick(e:MouseEvent):void {

var jsfl:String = new String();

jsfl += "fl.getDocumentDOM().height = 200;";	
		
MMExecute(jsfl);

}
This topic has been closed for replies.

2 replies

Chaint
ChaintAuthor
Known Participant
April 30, 2023
TypeError: Error #1010: A term is undefined and has no properties.
at my panel_fla::MainTimeline/fl_MouseClickHandler_2()

 

var fl;

high200.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_2);

function fl_MouseClickHandler_2(event:MouseEvent):void {
  fl.getDocumentDOM().style.height = "254px";
}

 

kglad
Community Expert
Community Expert
May 1, 2023

you can't use jsfl in an as3 document without using mmexecute and mmexecute only works if called from a movieclip that's used as a flash panel.

Chaint
ChaintAuthor
Known Participant
May 2, 2023
Chaint
ChaintAuthor
Known Participant
April 30, 2023

I tried using this code and it only seems to change the length of the symbol

high200.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_3);

function fl_ClickToGoToAndStopAtFrame_3(event:MouseEvent):void
{	
	height = 200
	gotoAndStop(2);
}