.
104 Construct2 Create Card Label From c2dictionary
1) Download Startup File.
2) Create c2dictionary file.
Create a json text file “dataset1.json” containing the sample data below. Import into Files folder.
{"c2dictionary":true,"data":{
"0":"A",
"1":"B",
"2":"C",
"3":"D",
"4":"E"
}}
|
3) Insert AJAX and Dictionary Objects.
4) Add Action during On Start Of Layout Event to request data file.
5) Add AJAX On Complete Event to Load JSON Data.
6) Move ShuffleIndexes Group into AJAX On Complete Event.
Set the IndexCount value = DictionaryCards.KeyCount
7) Modify varCardCount position and value.
Move it to the top of statements.
Set varCardCount=0.
And then, set varCardCount=DictionaryCards.KeyCount in AJAX On Complete Event.
8) Set Value to Dictionary Object In Create CardFrames Group.
9) Move Create CardFrames Group into AJAX On Complete Event.
10) Set Values to Dictionary Object in Create CardPieces Group.
11) Move Create CardPieces Group into AJAX On Complete Event.
OUTCOME.
12) Apply Index Shuffling.
Set values with new expression containing Index Shuffling values.
DictionaryCards.Get(str(DictionaryShuffle.Get(str(loopindex)) ))
OUTCOME.
DOWNLOAD:
.
No comments:
Post a Comment