View Full Version : really quick easy question
Hobbes
October 3rd, 2002, 05:38 AM
How do I add a variable name to the tick boxes within the flash MX components?
pom
October 3rd, 2002, 07:37 AM
Can you give an example, I don't understand what you're talking about.
pom :asian:
Hobbes
October 3rd, 2002, 08:07 AM
okay.
Im creating a form. On the form I have a number of 'input text' boxes, and at the bottom I can assign these text boxes a variable, that can then be picked up by a "cgi bin thingie" (which i didnt design). (this works fine).
My "cgi bin thingie" designer is now wanting to know how to put a variable on a tick box in flash. I used the components that come with flash, but the properties box at the bottom doesnt give the option to assign a variable...
:(
any ideas?
Cheers,
Obz
flex
October 3rd, 2002, 09:29 AM
Try this I did for someone here - it traces "checked" but instead of tracing check you can change the code to assign a variable
pom
October 3rd, 2002, 11:47 AM
You can also look at the tutorials here, there's one about creating a whole form, and there's something about checkboxes.
pom :cyclops:
Hobbes
October 4th, 2002, 04:14 AM
to assign a variable i use:
set (); ?
Im sure ive seen an assignVariable bit of code before.... but i cant seem to find it in the boxes.
upuaut
October 4th, 2002, 04:19 AM
actually you can just name the variable, place an equal sign and then whatever you want it set to.
ie
myVariable="this string of characters";
or
myOtherVariable=Math.sin(Math.PI*something/2);
or
stillAnotherVariable=4;
flex
October 4th, 2002, 04:20 AM
function checked() {
if (checkBox.getValue()) {
theVariable = whatever // <--- store a variable when checked
}
}
Hobbes
October 4th, 2002, 06:17 AM
thanks guys. :)
Hobbes
October 4th, 2002, 08:16 AM
just testing my signature :)
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.