Skip to main content
Inspiring
July 14, 2006
Question

Turn off certain mc's and then check if they were done correctly

  • July 14, 2006
  • 5 replies
  • 534 views
Hi there.

I have a small job where a student has to select any commas in a "dummy" sentence and remove those commas that they think don't belong there.

Then they click a check button to see if they removed the right ones, and then are given feedback (eg how many they got correct)

Anyone done this before?

Thanks in advance
This topic has been closed for replies.

5 replies

kglad
Community Expert
Community Expert
July 18, 2006
you're welcome.
Inspiring
July 17, 2006
ok here's what I've worked out so far with the C++ programmer here at work.

http://home.exetel.com.au/twistedpancreas/images/commas.fla

not sure if this is going in the right direction
kglad
Community Expert
Community Expert
July 17, 2006
i don't think that's going to work.

if you create a movieclip that contains only a textfield called tf and you give the movieclip a linkage id of tfmcID, you can use the parseF() function below to display your string with all the functionality, i believe, that you need:



Inspiring
July 17, 2006
well here's what we used in the end http://home.exetel.com.au/twistedpancreas/images/commas1.fla

i had one of the programmers here give me a crash course in arrays (but he's coming from a C++ background), so the code is a bit drawn out, but it was for my sake.

I might get him to look over you're code and see what he thinks, thanks for the help kglad, you're always a great help!!!
kglad
Community Expert
Community Expert
July 17, 2006
how do they "select" the commas that they think should be removed?
Inspiring
July 17, 2006
have each comma as a button, which they click on to turn visibilty on or off (I know who to do this) but am struggling with how Flash can check if they've clicked on the right ones and then give back feedback in a text box
Inspiring
July 16, 2006
or point me in the direction of where i could learn about arrays (online tutorials, etc...)
July 14, 2006
I've not done that exact thing but sounds pretty simple. You could keep the correct string in an array. Run String.indexOf(",") on the answer and compare it to running StringindexOf(",") on the array if they are the same the they got it right.
Inspiring
July 14, 2006
sorry im more a designer than a coder (though im still open to learn the "darkside")

:)

can you explain how an array works?