Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

as3 - coding to trace needed

  • 14-05-2016 12:45pm
    #1
    Registered Users, Registered Users 2 Posts: 47


    i have the following code implemented and it selects a sound file out of six in an array, but i want to be able to trace the one its selected. I also want CODE to align the corresponding text question to appear in text box on stage, and then three options for answers are given (a)(b)(c).. so i need to see its all corresponding
    this is the code
    var rand = mySoundArray[Math.floor(Math.random() * mySoundArray.length)].play();
    trace ?
    Finally the text questions and answers -
    //var questions:Array=["question one sample?","question two sample? ","question three sample? ","question four sample?","question five sample?"," question six sample? "];
    //var answers:Array=[ ["answer-A","answer-B","answer-C"] ,["answer-A","answer-B","answer-C"] ["answer-A","answer-B","answer-C"],["answer-A","answer-B","answer-C"],["answer-A","answer-B","answer-C"],["answer-A","answer-B","answer-C"] ];
    // placement of correct answer in answer array above
    //q.1 = [1]
    //q.2 = [2]
    //q.3 = [1]
    //q.4 = [0]
    //q.5 = [2]
    //q.6 = [0]
    hope someone can help


Comments

  • Registered Users, Registered Users 2 Posts: 788 ✭✭✭pillphil


    What's the code doing? Playing a sound file and asking a question with three possible answers? Does the order of sound files correspond with the question order?

    Store the random number in a variable and use it to access the other two arrays?


Advertisement