PDA

View Full Version : buttons as check box in flash



skm0911
September 14th, 2001, 04:19 PM
hi
can we show buttons as check boxes, if so once the mouse is clicked can we have the state remained,as it is.
i tried...any help in this matter please

thanqs
skm0911

suprabeener
September 14th, 2001, 05:42 PM
ok, as usual there are a thousand ways, here's a simple one

make a movie with two frames. first frame unchecked, second frame checked.

put a stop action in both frames.

make a button (in the movie) and do this:

on(release){
play();
}

that oughta do it. it may need a third frame with a gotoAndStop(1); in it, but hopefully will work without it. try and see i guess.

skm0911
September 17th, 2001, 10:46 AM
thanks, it worked but if i have few( 3 r 4) checkboxes and a user can select only one of them, how should i do it, do i have to write some Actionscript for it...

shiva

suprabeener
September 18th, 2001, 01:39 AM
make a movie of a check. name it check

make a movie of a box. put a button in box:
on(release){
_parent.check._x = this._x;
_parent.check._y = this._y;
_parent.chose = id;
}

select the box and write:
onClipEvent(load){
id=0;
}

copy the box and change id in each of them to be unique.

the variable "chose" will be the box where the check is. you may need to adjust the placement:
_parent.check._x = this._x+5;

as usual... there are a thousand ways... hope this one works for you.

skm0911
September 18th, 2001, 04:45 PM
thanks for reply with the sample code, i'm trying it out.
skm0911

upuaut8
September 19th, 2001, 07:47 AM
Sweet supra.. hadn't thought of that way of doing that myself. Sounds very efficient.