• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Frame Random Shuffle without repeating

Contributor ,
Sep 05, 2012 Sep 05, 2012

Copy link to clipboard

Copied

Hi,

Am beginning an eLearning project (I'm a retired social worker aiming in this lesson to help others) which includes building in AS3 an exercise called the GNAT (Go No/Go Association Task). The GNAT is a test tool that measures people's subconscious attiudes by having them choose (or not choose) by  pressing/touching the spacebar (in this lesson) when they see a specific target word.

For the first part of the GNAT, a practice exercise: 16 target words (presented one each in its own frame), taken randomly with no repeats from a list or array of 18 words. Frame needs to time out in 1000 ms. If the person reacts by pressing/touching the spacebar when they see a word, it is either scored +1 (depends on the word) or nothing. If pressed, an X or 0 displays for 100 ms (wrong or correct, depending on the word) and then goes immediately to the next random (no repeat) frame and word. If not pressed the timer timeout at 1000 ms goes to the next random (no repeat) frame.

Whew! For my relatively modest AS3 skills, not sure how to set up a model for this and implement in script. Could also be one dynamic text box in a single frame instead of multiple frames, with the text (target word) changing. But still would need a timer to advance and if pressed, an over-ride of the timer to advance, plus scoring.

If I can get a basic model working, then I can try to build the main test exercise tool which has 9 target words but these are recycled randomly in a 3:6:3 ratio totaling 70.

Major challenge!!!

I've tried various random no repeats using frames but can't get the most basic version to work.

I would appreciate any help getting started. How best to set this up and begin?

Regards,

saratogacoach

TOPICS
ActionScript

Views

1.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 05, 2012 Sep 05, 2012

Copy link to clipboard

Copied

Using frames is not likely to be relevant to what you seem to want to do.  One frame, one textfield, and code is all you should need.

Just create the array, shuffle it, and pick the first 16 or whatever words in the shuffled array, one at a time as you advance thru the exercise.  If you want a function to shuffle the array you can find the same one often offered in this forum, such as here...

http://forums.adobe.com/thread/1058786?tstart=0

If you need help with setting up a Timer, you should not have a problem searching Google for a tutorial (use "AS3 Timer tutorial")

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 05, 2012 Sep 05, 2012

Copy link to clipboard

Copied

Thanks, Ned for these ideas.

The question I have about using a single text box is 'can a space bar press/touch be captured in a split second (<1000ms) while a specific word is showing, in order to score it?'

Here is where I wondered if setting each word on its own frame would be easier to capture the scoring?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 05, 2012 Sep 05, 2012

Copy link to clipboard

Copied

Capturing the event is not an issue - it can happen as fast as the event does.  Having the user react in the time needed could definitely be. 

I always recommend to people to start small.  If you are wondering about whether some concept wil work or not, don't try building the house around the nail. Test the nail on its own to see what limitations it might present.  For the question you have, focus on answering it by testing it, but don't get concerned with molding it to fit the rest of the intended design... you can make that happen when it needs to.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Sep 05, 2012 Sep 05, 2012

Copy link to clipboard

Copied

LATEST

Thanks, Ned. Good advice!

I'll see what I can pull together. Need to just get a minimal basic design to start out, then build and tweak it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines