Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6688537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:24:54+00:00 2026-05-26T05:24:54+00:00

I am getting questions from the database (just text) and then passing them to

  • 0

I am getting questions from the database (just text) and then passing them to flash via flash vars. I want one question to be displayed then the user will answer (text) and click a button and then the next question will be displayed for them to answer and so on.

I am not hoping for overly specific advice but as I am very new to flash/actionscript am just looking for broad advice (or links ?) on how to approach this. Can I do it all from one frame just using actionscript ?

EDIT: I think what I am really after (assuming I am not way off track) is if all the questions should be handled at once which I guess will require some kind of loop that listens for some buttonclick event to move to the next question ….. or be ‘reloading’ the flash movie and dealing with only 1 question at a time.

Thanks for any help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T05:24:54+00:00Added an answer on May 26, 2026 at 5:24 am

    I saw your edit, here’s how I would do it:

    //class var
    private var answerHolder:Sprite = new Sprite();
    
    private function createAnswers( answerArray:Array ){
        if(answerHolder.parent){ //Makes sure we have a parent, so we don't get an ugly error.
            answerHolder.parent.removeChild(answerHolder); //removes answerholder, cleans out previous answers
        }
        answerHolder = new Sprite(); //new empty sprite
        addChild(answerHolder); //Adds the new empty sprite
        for (var i in answerArray){
            var newAnswer:Answer = new Answer(); //have a movieclip with linkage set to Answer
            newAnswer.txt.text = answerArray[i]; //Have a text field in Answer with the instance name of txt
            newAnswer.x = 50;
            newAnswer.y = 100 + newAnswer.width * i;
            newAnswer.name = i;
            addChild(newAnswer);
            newAnswer.addEventListener(MouseEvent.MOUSE_DOWN, selectedChoice); //MAKE SURE to have imported MouseEvents!
        }
    }
    private function selectedChoice(e:MouseEvent) {
        trace('Selected ' + e.name);
    }
    

    This is no means completed code or anything (You will get an error because I didn’t write a constructor, nor the questions, and I pulled answerArray out of thin air, you also need to addChild(answerHolder) too), it’s something to get started 🙂

    createAnswers() can be called again, when you have a new question – this is because the sprite that holds answerHolder is cleared.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just getting started with db2. Quick question about giving it SQL commands from a
Few days back, I posted a question about getting student marks results from database
This follows on from this question where I was getting a few answers assuming
Basically from a database I am getting data that is formatted like this nameofproject101
I know this is an easy question, I am just not getting something...so thank
I know this will seem like a dumb question but I'm just getting started
I can see there are a lot of questions for getting the number of
OK, I know there have already been questions about getting started with TDD ..
i posted the other day with practice questions i was getting stuck with and
This question is a follow up to my previous question about getting the HTML

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.