How to import json file in action script and then get random element from json array/object?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m using as3corelib for parsing JSON. You can download it here:
https://github.com/mikechambers/as3corelib
I wrapped it to class:
Then call it like this:
Then you have jsonObject and you can use like array and randomly pick up items.