Skip to main content
Chaint
Known Participant
Apr 30, 2023 3:30 AM UTC
Question

Unable to adjust panel height via buttons

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 is closed to new replies. Start a new post to keep the conversation going.

5 replies

Chaint
ChaintAuthor
Known Participant
Apr 30, 2023 6:35 AM UTC
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";
}

 

Translate
kglad
Community Expert
Community Expert
May 1, 2023 2:41 PM UTC

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.

Translate
Chaint
ChaintAuthor
Known Participant
May 2, 2023 3:49 AM UTC
Chaint
ChaintAuthor
Known Participant
Apr 30, 2023 4:56 AM UTC

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);
}

 

Translate