ActionScript 2.0 :: Magic 8 Ball - Ask Button And Answer Response Field
May 24, 2004
I'm creating a magic 8-ball for my website, just a fun little thing to play with you know. I've got an input field called "question" where you can type whatever you want, an ASK button called "ask" and a response field called "answer". Once you enter a question and hit the ASK button I want flash to randomly reply in the "answer" field with YES, NO, MAYBE, DEFINATELY etc. Do I need some kind of answers array to store all the answers and then call them at random into the "answers" field? Am I on the right track?
View 7 Replies
Similar Posts:
May 24, 2004
I've got an input field called "question" where you can type whatever you want, an ASK button called "ask" and a response field called "answer". Once you enter a question and hit the ASK button I want flash to randomly reply in the "answer" field with YES, NO, MAYBE, DEFINATELY etc.
Do I need some kind of answers array to store all the answers and then call them at random into the "answers" field? Am I on the right track?
View 7 Replies
Jan 28, 2008
Something in the line of the preloader of [URL]
how to create a magic ball with some moving myst inside.
I am looking into the flash particles, but i could use some more pointers examples and/or tutorials
View 1 Replies
Jan 27, 2011
Im currently doing a flash project at university and my intention is to make a magic 8 ball style animation, but i'm having trouble with coding the answers so they come out randomly.
View 4 Replies
Jul 8, 2010
I am trying to get an answer from Input text Field and compare it to the correct answer.here is how my code look like:
//I have a confirm button here
confirm_button.addEventListener(MouseEvent.CLICK, ConfirmFunction);
//I have a correct answer as a String here
var correctans:String = "July";
[code]....
This will check if correct answer contains words in the answer from input text field.But that will result on if I key in "July is great", it will still link to the correct answer frame instead of wrong answer frame.I want the answer to be exact same as the correct answer.
View 4 Replies
Aug 27, 2010
I have a grid with 12 movieclip buttons. When a button is pushed a answer is displayed and on the answer frame, there's a button "click for more information".
That button points to information in a frame within the mc button. However, when I test it all the buttons on the root timeline appear on top of this information, covering it up.
Also, when you move the mouse while in this "further info" area, it disappears
View 1 Replies
Nov 6, 2009
here's what I want to do: I need a simple CV search function for a small site. There will be two fields: on the first field the user will input a Name or Surname and on the second field the script should return one or more results taken from a pool of names + surnames that should be clickable links to the respective .htm page of each cv. Is this possible?
View 0 Replies
Nov 6, 2009
here's what I want to do: I need a simple CV search function for a small site. There will be two fields: on the first field the user will input a Name or Surname and on the second field the script should return one or more results taken from a pool of names + surnames that should be clickable links to the respective .htm page of each cv. Is this possible? From what I've seen people use the replies in the second field as simple text and not as links.
View 2 Replies
Feb 4, 2009
i have created a fill-up word blank and button. After filling up the word blank, click on "result" btn. the instance name of the text field is answer_txt.
[Code]...
How do i make the script recognise the answer input in all cases? For e.g
View 1 Replies
Feb 6, 2010
I am trying to connect my flex app to a CFC I have which calls a method. It's to test a login control, and when i put the correct credentials in, it comes back with the error: "SOAP Response cannot be decoded. Raw response: ".
[Code]...
View 1 Replies
Oct 22, 2010
Frame one has three draggable movie clips and three finishing locations (one clip per location), it also has one a button (Check answer)A user can drag any of the three clips to any location and then click Check Answer.Check answer then runs an action that if the clips are in the right places, it goes to frame 2, if they are not, it goes to frame three where a Reset button is provided. In either case, a message is displayed.
On frame 3, I want people to be able to change the positions of the clips and select Check answer and have it check the answer again. Currently it's letting me move the clips, but even when I put them in the right places, it still tells me it's wrong.[code]...
View 1 Replies
Aug 7, 2009
i am creating a maths quiz...There are 2 input text fields..The instance names of 2 input text fields are inputField and inputField02. There is one dynamic text field to display the result....The instance name of dynamic text field is resultField.
Code:
var a: Number;
var b: Number;[code]....
however when i press on answer button, the result displayed is NaN.What's wrong with the code?
View 1 Replies
Aug 17, 2009
I'm creating a sort of guessing game/trivia with AS 2.0. I have a popup window with a question, and four answers with a button next to each answer. The question and answers are dynamic text that are set by clicking on a "question" button.I was thinking I could do was click an answer button, which sets "current answer"... compare that with "correct answer" and do something? If it doesn't match, set the dynamic text to "wrong answer". If it's correct, then gotoAndStop(something)... I can get the answer buttons to trace their values(current answer) as I click on them, but when I try and goto () or do something based on these values (true) it seems just do whatever is in the if statement... not based on the answer being correct?Hmmm... like if I say: if (This is true)Not sure if I'm explaining this properly. But basically I have a popup window with a question. I have four answers, with buttons to select choice. I want to compare the choice/buttons pressed with a variable "correct answer" and then do something.
View 4 Replies
Apr 5, 2011
The code runs fine, but the problem I'm having is that the text box that is suppose to go onto of my answer buttons is behind the button itself... however, if I change two lines of code around, the answer validation code doesn't pick up the which answer was clicked (it returns undefined). This is infuriating!Look for the line "//INSERT HERE." If I take the line, "var answerField:TextField = createText(answer,answerFormat,answerSprite,0,0,450);" and put it there instead, it returns the right answers (doesn't return undefined), but I can no longer see the text. I've included the createText function as well.
private function askQuestion()
{
trace("asking question...");
[code]......
View 2 Replies
Nov 20, 2009
How do I delete/remove a movie clip after the wrong answer button is clicked?
View 16 Replies
Jun 20, 2006
i wanna ask how do i make a ball bounce off something like a ball bouncing off a bumper in a pinball game? i've tried a lot of times but everytime the ball get stucked to the box and it doesn't move anymore...will be grateful if anyone noes the actionscript of it..
View 3 Replies
Feb 17, 2009
I have some asynchronous stuff going on in my Flash movie and would like to determine how much time elapses between two events -- e.g., a button click and the response from a socket server.
I'm wondering how to go about this in AS3?
View 6 Replies
Sep 30, 2004
I'm working on making a small flash site, the client has requested that the site respond the the Back button So I googled, and found this great tutorial: See It Here: [URL] Get Source Here: [URL] Bascially I want to change the current code on the numbered HTML pages (1.html - 5.html) currently this is the code inside these pages
[Code]...
View 3 Replies
Jun 5, 2009
ball collision inside another ball using gravity.I have one large circle in the middle of the stage (its radius is 150 pixels). I have another circle inside of that one (20 pixels radius), this is the smaller ball that I would like to have bounce around inside of the larger one with gravity. When the small ball hits the edge of the larger circle, I would like it bounce inwards to the center of the larger circle. It keeps doing this until it eventually stops in the center of the larger circle at the bottom.
View 1 Replies
Apr 20, 2010
Related to:Flex SDK 3.5 - Check file mimetypeIs there a way to get a file's magic number in Flex SDK 3.5 in order to get the file type?
View 1 Replies
Apr 25, 2011
I have a feeling this would be easy or has already been accomplished with someone who's good at AS3... I was customizing "xml magic pages" which I found online, and doing pretty well with my limited knowledge. BUT I need to have "previous" and "next" buttons, so users won't have to click each button (one section has 14 pages).
I learned how to name the dynamic buttons, but I still can't use that info to show that page (or ultimately the next or previous page). Magic pages is free and easily found online, but I could post the code here (or my code).
View 2 Replies
May 21, 2010
I have a ball bouncing that works great. What I want is a button that will make the ball look like its in slow motion (while still bouncing at the same height) and another button to put it back in regular motion. After hours of experimenting I still couldn't get it perfect. The following code is on the ball movieclip.
Code:
onClipEvent (load) {
var acceleration = 0.005;
var termVelocity = 20;
[Code]......
View 9 Replies
Jan 6, 2012
Is there a way to implement buttons inside the "big Pic" movieclip?
The activator mask seems to cancel out any buttons I make inside
the "big Pic" movie clip.
View 2 Replies
Mar 7, 2010
I want to take a static text field, convert it into a button, and use it as a button. I need it static, because I changed orientation, and I do not know how to do that otherwise. The problem is, even though I converted it to a Button symbol, it does not work when I test the movie. It works fine with "Enable simple buttons", but when I test it, the button is not there, no change in mouse cursor, no reaction at all.So this is what I did:
Made text. // static, not selectable, Orientation: vertical left to right, / //rotated; Two filters: Drop Shadow and Glow;
Converted text field to Button - Symbol (scrollBT)
Editing the Button,I put the same content (the static text field) in all four frames: No luck, not working. without the Hit frame filled (which I think doesn't really make a difference): No luck, not working.Tried again, converting the static text field in the button into a Graphic Symbol: No luck, not working.Tried again, and put some differences in the frames for "ON" and "OVER" etc.: No luck, not working.Tried again, duplicating a similar, working button, edited it, and: No luck, not working.
To the button itself and the AS: The button will be a scroll-button for a text field, with different scroll speeds on rollover and press, but nothing else. The code for that I have (I think). It's something like (and please excuse my incorrect syntax here, but I'm typing from memory; still, I use the Script-Assistant and my syntax is apparently correct; it's also working with other buttons):
on {rollOver} {
function (scroll) {
textfieldtxt.scroll - = 1;}[code]....
I'm at the end of my wits. The only difference I can tell from other (working) buttons I did the same way, is that the scrollBt does not do anything except scrolling, while all of the others have frame actions (gotoAndplay etc.) associated with them.
View 1 Replies
Sep 2, 2010
I have 12 movieclip buttons which each contain a question. When you click on one, the answer appears. I need the answer to remain on the screen. On that same frame, there's a button for "more information".When that is selected, it goes to another frame within the mc, and more info appears. However, it is covered up by the other 11 buttons from the main screen
View 2 Replies
Sep 19, 2011
is i can make a button as dynamic field ?????? (need to display input text)
View 1 Replies
Sep 17, 2010
I have a quiz created in Flex using Spark forms, with a series of questions which are a group of radio buttons. When the user clicks "next", I get the value of the selected radio button in the group. What I need to do is keep track of these values; at the end of the quiz I will need to see which value was chosen the most. So if the user mostly picked the questions with a "3" value, I can display a summary based on that, e.g. "You mostly chose type 3 answers". I was thinking about having an int variable for every choice (there are 5), and incrementing the appropriate variable when the user clicks "next", as in
private function enterScore(i:int):void {
switch (i){
case 1:
num1++;
break;
But this seems unwieldy. I also will need to compare the 5 tallies for which one was chosen the most...
View 1 Replies
Sep 9, 2009
I have 2 swf animations (one of a happy bear and one of a sad bear), I want to load them into actionscript. When the player gets it wrong I want the sad animation to play and happy one to play when the player gets it right.
View 2 Replies
Jun 29, 2004
The user needs to submit a dollar amount answer. They could write is several ways. I'm trying to accomodate it with the code below. It always evaluates it as the wrong answer (the else).
[Code].....
View 4 Replies
Apr 24, 2009
I created a movie clip that I'm using as a button The text label on the button is determined dynamically by a variable (txtVar1) in the code. The EventListeners tell the button movie clip what frame to display acording to the mouse state. The problem is, when you mouse over the button, it "forgets" the var:String in question. It should continue to display the text from the variable ("One Bedroom") regardless what frame the button clip is currently on. I think I need a way to update or refresh this variable with each mouse movement. Also, the whole thing seems to only function once, or sporadically at bestAnother weird thing is, it's ignoring the "buttonMode = true" statement for some reason.
stop();
var txtVar1:String = "One Bedroom";this.lgndOneBedroom_mc.addEventListener(MouseEvent.MOUSE_OVER,
[code].....
View 5 Replies