This content has been marked as final. Show 7 replies
i came with this script a while back and use it just about every site i make.
_name, I'm intrigued by your answer, but don't see a script or URL in your post.
by the way, when you are using ten buttons it is best to make only one button and keep reusing it. be sure to label all of your animation states within your button and use my code to call them at their appropriate times (i.e. onRollOver / onRollOut/ onRelease). if you have dynamic text inside your button instance and you want it to read differently for each button just add this to the for loop (make sure your instance name reads as you want your text to appear in the button - ex. you want your button to say "HOME" then make its instance name "HOME"):
OK, thanks for the code. I'll take a look at it.
I'm excited about your suggestion of using the instance name for the button text. But I think I'll have a problem.
My project is an astronomy demo, and I want to label the buttons with text like:
"e = 0.1" (for the eccentricity of a planetary orbit, if you're curious) Even without the "e =" part, I still want to label the buttons with numbers.
Do you see a way to use this text as an instance name anyway, or am I stuck creating individual text labels?
Thanks again for your timely assistance.
i think you could accomplish it. your going to have to something like:
Yes. I now realize a little string processing will take care of that, right?
I'm also realizing that I could allow any old value between 0 and 1, not just 10 decimals. So I could just as easily build a slider as a control. Hmmm... funny how the brain latches onto one idea and doesn't let go until shaken hard.
Thanks again for the help!
i attached an example to the thread by editing my last post. take a look.