This content has been marked as final. Show 6 replies
Open the docs that ship with Director (F1), activate the Contents tab,
click/expand the Using Director section, do the same for the Using
Flash, Flash Components, ... section and then the CheckBox component
section and finally the Property summary for the CheckBox class
Hi Sean, thanks for your tip. In fact, I did not see that part of the doc yet.
But, it does not help. I can still not detect if a checkbox is checked, because the .hilite property of it does not change.
I attached the following basic behavior script to the checkbox sprite:
if member("ckbCheckbox2").hilite = TRUE then
put "Checkbox 2 CHECKED"
put "Checkbox 2 unchecked"
Clicking the checkbox I always get "unchecked", even if the initial state is "checked" (property .selected = true). It seem that the .hilite property doesn't change at all.
A non-Flash checkbox and it's behavior work OK.
I don't know where you're getting the 'hilite' property from as the docs
- in the section I referred you to - detail a 'selected' property, which
is what I think you need to get/set.
As far as I can see, the .hilite property gives the current selection state of a checkbox, whereas the .selected property sets the initial state of Flash checkboxes.
(click the sprite on the stage - that is, check the box)
Yes! I see what I did wrong.
Thus, the difference between the two types of checkboxes is that the normal checkbox uses the 'hilite' property of the cast member. The Flash checkbox, however, uses the '.selected' property of the sprite.
Thanks for your help.