Make a button set width and height?

24 views
Skip to first unread message

Beany

unread,
Apr 9, 2011, 12:33:08 PM4/9/11
to SWFFit
Ok simple question... I'm trying to make a button in Flash set the
width and hight of the SWF to 982x1200 when clicked on. I'm using AS
3.0.

How would this be done? I guess the buttons code would be something
like:


buttonName.addEventListener(MouseEvent.CLICK, buttonBut);
function buttonBut(event:MouseEvent):void
{
//code to make SWFFit resize width and height
}


Can anyone help?

Miller Medeiros

unread,
Apr 9, 2011, 1:07:59 PM4/9/11
to swf...@googlegroups.com
check the AS3 classes that comes inside swffit.zip file, there is also an example on how to call the methods from inside flash. the example files are inside the folder AS_class.

good luck

> --
> You received this message because you are subscribed to the Google Groups "SWFFit" group.
> To post to this group, send email to swf...@googlegroups.com.
> To unsubscribe from this group, send email to swffit+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/swffit?hl=en.
>

Beany

unread,
Apr 9, 2011, 1:52:55 PM4/9/11
to SWFFit
Thanks, after a bit of messing around i got it working with this...


buttonName.addEventListener(MouseEvent.CLICK, doStuff);
function doStuff(event:MouseEvent):void
{
var w:int = 982;
var h:int = 1200
SWFFit.configure( { minWid: w, minHei: h } );
}
Reply all
Reply to author
Forward
0 new messages