PDA

View Full Version : Generating file name from check-box results


JuhaTee
02-28-2011, 11:01 AM
Hi,

I'm a beginner in as3, so bare with me.

My question is, is it possible to generate a file name in as3 according to choices from a series of check-boxes?

I have a few hundred number coded image files that I need to load in a Flash movie according to user choices made in a selection menu. The images are named for example 1_2_3_4.jpg, where each number refers to a certain category. So when the user selects choice number 1 in the first category, number 2 in the second and so on, the results should generate the corresponding file name.

This might be just a walk in the park for you more experienced coders out there but I just can't get started with this...

audiopro
02-28-2011, 01:41 PM
Do you have the checkboxes set up?

CheckBox1Name = "3_";
CheckBox2Name = "6_";
CheckBox3Name = "4_";
CheckBox4Name = "9_";

NewFileName=CheckBox1Name+CheckBox2Name+CheckBox3N ame+CheckBox4Name+'.jpg.;

trace(NewFileName);

// = 3_6_4_9_.jpg

JuhaTee
02-28-2011, 02:50 PM
Thanks a lot! I think this might just be the thing I'm looking for.

I will test this in the next week or so and let you know how it worked.
Thanks again.