Graph Opinion

Thank you so much. :beam: I would absolutely not be able to do this without you!
:crying:

Im going to try put everything into one array, will make it easier to follow. I dont understand why you have the states change colour when you press the color button. Should it not just change colour when the state is selected?

The reason that the states change color when the user selects a button is my instructions were to allow them to do so. Those states that change color represent the states that are already decided, and rather than just having them set to a certain color when the game begins, the user sets the color.

I am supposed to have odd colors that don’t represent anything rather than just red and blue like you would expect with a US election because we don’t want to show what we are for republicans (red) or for democrats (blue) or any colors that could be associated with any other political things. Politically correct in other words.

ps- now this may bore you but here is so more information into what I am working on this for (we, my company, come up with something new each year)

http://www.cbservices.org/cbs/natri/2003.html

this year’s conference takes place right near Washington DC, hence the whole State election themed quiz

Im still unclear about this colour thing. At what stage does the user decide which states they want to visit? Or does he just pick a colour and then answer questions on those states? Sorry to go on but it is better i am clear as to what is happening. Ill have to look at your links later.

That’s quite alright. You don’t need to look at the links, it is just some background information not direct information about this particular quiz.

This is what will happen:
A person (the user) will sit down at one of the computer stations displaying this swf file.

They will hit a start button, and an explanation of the game they are about to play is displayed on the screen.

They are then asked to enter their name, we’ll use my name (Jill) for example.

I type in Jill and a message is displayed, “Hello, Jill, please choose your campaign color.”

**It is now ** that I select the color that turns 20 of the states the color that I choose. These states are then disabled, because it has already been decided that the user, in this case me, gets credit for those states.

Reason for this is so that we only have 30 choices (which are the remaining states which have not turned a color) rather than 50. These are the states that the user is allowed to click on to load a question, not the states that turn a color when the button is clicked on. Then the user only has to get 6 more correct (they are allowed up to 10 choices out of the 30) to win by a majority rule. (26 out of 50 states)

So, the 20 states are set in that color, then the user begins the actual choosing of what states they want to answer a question about. They click a state, a question is displayed, and if they choose the correct answer, they receive some feedback (yes you’re right) and the state turns the color they selected for the other 20 states.

If they answer the question incorrectly, the state will turn another color set by me.

It still has not been decided if the games stops once they get 6 correct, or if they will continue to answer a full 10 questions.

Supporting events will be a button that can be pressed to load a hint about a question, and some type of graph that reacts to a right a wrong answer.
For example, a bar graph (with two bars) that moves a bar longer if the user gets a right answer or a different bar longer if the user gets the answer wrong. That bar will represent the opposition.

Please don’t hesitate to ask me to explain more if you still don’t understand.

ok, so basically if you have the same 20 states for each colour button, you only need 30 questions?

Yes, exactly. The 20 states will be the same no matter which color is chosen.

Well looking at the file now, I guess one of those most obvious things to begin with is to take the name entry/color selection part and make those into a mc, therefore eliminating my need for the two frames in the main movie. Sometimes I just don’t see the simplest things. :te:

Well if you have not already started with the other fla I at least made the name entry and color selector buttons into an mc, so that there are not 2 frames on the main timeline. Don’t know why I was thinking it had to be like that.

http://www.cbservices.org/cbs/test/jill/whatamesspart2.zip

seems like you are managing quite well on your own.
http://www.gifsrus.com/testfile/maptest_withinterface&questions1.fla
I have actually increased the number of arrays rather than decrease (doh!)
I have changed it around a little in that the first 30 [“mystate”+i] will be the ones you have questions for. I have looped through the arrays for questions and answers just to show you that it will work with the questions you have decided upon for each state.
Edit/
I have put all correct answers as “A” but obviously you can type these in mauually later.

Wow, now you are really on a roll. Your file looks great. I had a meeting today and it was decided that the question is going to have to go back to being loaded as its own swf rather than just as text. You know that feeling where you are reaching for the car door and the person driving just keeps pulling right out of your reach each time…sigh

Anyway, asap I am going to get work and change what I can to have the questions load as such. The reason for the change is that is has been decided that their needs to be artwork included with the questions and keeping that all within one movie would equal such a large file size.

So I will go cry in my corner for a while, get over it, and get back to work. :puzzled:

Thanks for your enduring help!!

Ok, well its not that different really so your work has not been completely wasted.

You are right but I do have a tendancy to get frustrated when things go that way. I need to look at the bright side of it, and see how much I learned.

Anyway, I am about to go into the last file from you and see about editing it to fit the new parameters I have been given. The main things that need to be done are:

The premise of the game has changed. Instead of only the player having credit for 20 states right away only (the states that the color is selected for)
The player will still select a color and have credit for 20 states, but the imaginary opponent will also have 20 states to start off with, but I will set the color of those.

That will leave 10 that belong to no one yet. The player will be allowed to choose from the 10 that are credited to no one along with the 20 that belong to the imaginary opponent.

Do you follow? The person playing will get more credit for taking away an opponents state (which means answering a question correctly when the opponents state is clicked on) than for getting one of the 10 states that no one has credit for.

So, I then have to make the answers effect a graph that goes up for the player if they get an answer right and it also effects a graph that goes down if the state was one of the states that was in the opponents color.
Do you think that is something I should worry about working in right away or can it be added easily later?

I also need to change the set up so the question is an swf brought in with the loadMovie command rather than using attachMovie.

Where would you suggest is the best place for me to start? I am trying to look at the big picture rather than small pieces that I try to make work together later.

By the way, how did you get to be such a Flash Scripting wizard? Have you been doing this a long time?

One more possibility. I could just load that artwork that goes with each question as a separate swf, rather than the artwork/question combo (as an swf) that way I could leave things as they are and use loadMovie at the same time it is attaching a movie clip. That might be even more complicated though.

so i guess when the user gets one wrong then the opponents score/graph/statecolour also go up?
I don`t think the graphs should be a problem at all.
learning flash 2 years.
If the design of the art work is such that it can all go on one layer eg/below the textfield i think it is a good idea to load it in as a seperate swf.Rather than use loadMovie at the same time as attaching, it is better to set up a loop to load the artwork in while the user is busy picking colours or answering earlier questions; that way no waiting.
if you can seperate the artwork then there is not really that much to do.

2 years huh?

Okay, yes you are right about this:
so i guess when the user gets one wrong then the opponents score/graph/statecolour also go up?

I am glad you think it is a better idea to load only the artwork in as separate swf’s because I was wondering how hard it was going to be to have the question swf’s effect the main swf…you know like if they pick the right answer than the state turns color, etc.

I understand what you say about loading all the artwork at begginning of the movie, just not quite sure how to have them already loaded and then call on them when you need them though. I think right now that is one of the least things to figure out.

Ok, unfortunately I have other projects I have to devote my time to for now. I can’t wait to get back into this “game” so I better go get the other things done.

Thank you!

yes 2 years and you?
The loading thing is pretty easy, just make seperate mc for each and then make _visible false when loaded,_visible true when needed.

Well I am a bit embarassed to admit, I first used Flash (it was Flash 5)
in 2001 so it has been 3 years, but only once a year do I get a chance to really use it other than for small things here and there. (At work anyway) During my personal time I always have intentions of doing things to learn more I just have a constantly busy life.
I am going to take the first set of classes to be certified in Flash next month so I am looking forward to that.

I could have just said 3 I have a tendancy to over-explain things :smirk:

Anyway, setting the visible property makes good sense. I will be back with my endless questions soon. :pleased:

Stringy~
I am looking at the last file that you prepared (from the 8/24 post)
and I am having trouble finding something. I would like to reset the states that are chosen when the user selects a color.
I see that this block of script:

[SIZE=1]stop();
for (var s = 30; s<50; s++) {
myArray.push(this[“mystate”+s]);
}
for (var g = 0; g<myArray.length; g++) {
myArray[g][“myColour”+g] = new Color(myArray[g]);
myArray[g].col = myArray[g][“myColour”+g].getTransform();
}
for (var j = 0; j<5; j++) {
this[“color”+j].onPress = function() {
for (var i = 0; i<myArray.length; i++) {
myColour = new Color(myArray*);
myColour.setRGB(this.col);
_root.maincolor = this.col;
}
};
for (var l = 0; l<myArray.length; l++) {
myArray[l].onPress = function() {
myArray[l].enabled = false;
};
}
}
reset.onPress = function() {
for (k=0; k<myArray.length; k++) {
myArray[k][“myColour”+k].setTransform(myArray[k].col);
}
};[/SIZE]

Is being used like you had shown in a previous example to change color when a color button is selected. What I cannot figure out is where the states (movieclips) that are effected by this are stored. I am confused. I see the reference in the begginning to [SIZE=1]myArray = [];[/SIZE] but don’t know where it says what values are stored in myArray.

for (var s = 30; s<50; s++) {
myArray.push(this[“mystate”+s]);
}

so
myArray[0] =myState30
myArray[1] = myState31