This content has been marked as final. Show 3 replies
The Flash Components are not documented in Director, though they are
documented in Flash. If you can parse the dense and difficult to
understand Flash Help file (and yes, you would need to have Flash to get
it), then you can see all the docs for those components.
Before I go much further, I should say that in my experience, using
#flashComponents is a painful and tedious business. I do not recommend
it. It will probably be MUCH easier on you in the long run if you write
your own script from scratch.
But, for the sake or archival completeness, this is a script that will
do what you want with the checkbox/radio button #flashComponents:
1) Go into the Property Inspector and on the FlashComponent tab for each
member, make sure that the eventPassMode is set to #passAlways
2) Put this code onto the buttons:
on mouseUp me
if sprite(me.spriteNum).selected then
on deselect me, vExcept
if me.spriteNum<>vExcept then
Hmm. My code was functionally not much different from yours. (I didn't use
sendAllSprites because I've got more than one independant group of Radio
Buttons, and I only want each to send to the other sprites in the same
group, but otherwise it's not much different.) I guess the only thing I was
missing was the eventPassMode setting. But anyhow, what you're basically
telling me is that contrary to the Director documentation, this does NOT
happen automatically? Or is that the part I'd need to know more about Flash
to get to happen? (I've tried programming in Flash before, man that was a
pain. Everything is 10 times more complicated than it needs to be...)
You may be right that just doing this from scratch would be the easier plan.
I know I can drum up that code on my own, I just figured why bother
reinventing the wheel if the feature is there in the program? But if it's
as complicated as you say, (and as my limited experience in Flash
corroborates) it might truly be the easier way to do it.
I fully agree with you, I have had very few good experiences programming
in Flash. But these #flashComponents are useful for only very simple
tasks. Anything more complex, like trying to set their state on
beginSprite for example, is a true torment. Try it. It's fun.
You can actually use your existing code to make your own custom buttons.
Just make a property called "selected" and set it to switch to 1 or 0
when it gets clicked. Keep that same code you have to tell the other
ones in the group to uncheck. And change the member of the sprite to
the appropriate member.