ActionScript 2.0 :: Get The Correct Answer If Click The Red Color And Fill Into The Star?

Mar 25, 2012

i am develop 1 simple game for color fill to object, but now i have something wrong in my code...how do i get the correct answer if i click the red color and fill in to the star?

View 4 Replies


Similar Posts:


ActionScript 3.0 :: Get An Answer From Input Text Field And Compare It To The Correct Answer?

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

ActionScript 3.0 :: Using Buttons To Select The Correct Answer?

Dec 22, 2010

I have a simple game I am attempting to write. random movie clip (from the library) is displayed on the stage from an array of mc's  Here's the question. What my game will do, is allow the user to select one of two buttons (red and green) based on the movieclip that is displayed. One will yield a correct result and the other will yield an incorrect result.HOWEVER, depending on the movie clip displayed, sometimes the red button will yield the correct result and sometimes the green button will yield the correct result. I am having trouble figuring out the best logic in writing code to accomplish this.

View 2 Replies

Professional :: Multiple Choice Quiz - How To Set Correct Answer

Jul 1, 2010

I'm using CS4 and trying to create a new quiz using one of the templates.I can see how to edit it to get only Multiple Choice but I'm stuck at one thing - I can't see where to specify which choice is the correct one.

View 4 Replies

ActionScript 1/2 :: Input Text Will Not Allow To Access The Correct Answer

Mar 8, 2012

i am trying to create a simple quiz in school. I have one test question which requires the answer to be -1.I have created Input text and assigned the variable answer for this question.I have a button with the following AS2 script: 

on (press, keyPress "<Enter>") {
if(answer eq "-1" or answer eq "minus 1"
or answer eq "Minus 1" or answer eq "Minus one" or answer eq "minus one")

[Code]....
 
Firstly whatever you type the numerical keys are immobilised on the keyboard when the .SWF file is builtSecondly I cannot enter the correct answer!! If I type in Minus 1 etc it goes to frame 3.I have tried flags rather than frame numbers - same problem.i have tried remaking the quiz as a  separate file.using CS4 and CS5 flash - windows 7 PC.

View 6 Replies

ActionScript 3.0 :: Drag And Drop - How To Get Correct Answer On Stage

Feb 6, 2011

Basically imagine a stage with 1 question on it and 3 possible answers. All the answers are draggable and the correct answer must be dragged to the answer area. If the wrong answer is dragged it bounces back... The problem (which in my opinion seems quite basic) is when the correct answer is dragged onto the answer area, I can't get it to do much. I can run a trace and that works so I know its setup correctly but I think i'm coding it wrong within the IF statement. My entire code for the correct answer is kept in a seperate as file and I have listed it below:

package code {
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.geom.Point;
public class Three extends MovieClip {
[Code] .....

The bit where it says " if ( dropTarget.parent.name == "answer" )" I'm presuming is where the code has to go. I want to either goto a frame label within the main timeline which says "Congrats" kinda thing OR the other way I can think is adding a movie clip to the stage with the congrats msg in.

View 1 Replies

Flash :: IDE - CS3 Fill A Color - It Shows Lock Fill

Oct 23, 2010

I am new to flash, trying to do some animation character. I have 2 queries

1. What is lock fill; whenever I am trying to fill a color, it shows lock fill....

2. If I am creating a non regular figure like say with pencil, if I draw some part of it & do other part by later; these will be assumed different objects & I am not able to fill the whole figure with a selected color.

View 2 Replies

ActionScript 3.0 :: Create Flash Quiz Based On Circling The Correct Answer?

Dec 27, 2010

I am quite new to actionscripting and need to create a flash based quiz.The user will have to circle the correct answer in the quiz.I do know of drag and drop function but didn't know how to create circling function.

View 11 Replies

Professional :: Movieclip Exported With Class Name Star And In Star?

Jul 5, 2011

well in my fla i have a movieclip exported with class name Star and in my Star.as file i have this code:
 
package {    public class Star    {
public function Star()        {
this.visible = false;
}
}
  
i tried putting movieclip on and off stage but didnt work all i want to do is control my class Star in my fla. Im very new to OOP and trying to get the gist of how to control objects like the way you could by instances like i used to :/

View 5 Replies

ActionScript 2.0 :: Make The Color From A Mc - A Square With A Flat Fill - Fade From One Color To Another

Jan 31, 2004

How can I make the color from a mc, a square with a flat fill, fade from one color to another (by using actionscript only) ?

View 4 Replies

ActionScript 2.0 :: Script An Animated Button Of A Square (no Fill) Where On Rollover The Stroke Color Changes From One Color To Another

Jun 16, 2003

Hoping someone can point me in the right direction with this. Instead of creating a button and nesting movie clips for each state, I'm trying to script an animated button of a square (no fill) where on rollover the stroke color changes from one color to another (tweening the tint). I want to do this to the button symbol so it's the same for all instances. Is this possible or do I have to go the button > nested MC route? Sorry if this is lame...it's been awhile since I've used Flash and I've forgotten quite a bit.

View 7 Replies

ActionScript 3.0 :: Change Stroke Color And Not The Fill Color

Oct 27, 2009

I am looking for a way to change stroke color via AS3. The objects I would like to change are created with flash professional. They do have a fill. I just want to change the stroke color and not the fill color... is this possible? ... or am I stuck removing all fills and using a filter?

View 1 Replies

ActionScript 1/2 :: Click The Right Answer(s) Using Check Boxes?

Jul 6, 2010

As part of a flash 8 project, I have created a Quiz using Check Boxes.In Question 1, I have got 8 Ckeckboxes in 2 columns of which check boxes:- B, D. E, and H are correct answers.The rest are the wrong answers. However user may tick all the right ones and also tick couple of wrong answers (eg user mayWhat I want is when user selects only the correct boxes (B, D, E, H) answer equals 1 point (right answer).A, C, E, G equals 0 point (wrong).B, D, E, H and combination of other checkboxes equals 0 point (wrong answer).A, C, F, G and combination of other checkboxes equals 0 point (wrong answer).A, B, C, D, E, F, G, H equals 0 point (wrong answer).I need a method using actionscript 2.0 to work this out. I think I've worked out the first part where user selects only the correct boxes (B, D, E, H) equals 1 point, and if user only selects the wrong boxes (A, C, F, G) equals 0 point. But I can't work out other parts. I tried using logical || (OR), but does not seem to work properly.

View 3 Replies

ActionScript 2.0 :: Button Is Pushed A Answer Is Displayed And On The Answer Frame?

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

ActionScript 1/2 :: Fill An Object By It's Color Name?

Nov 8, 2009

I've created a colour palette and given each colour a unique number and name (E.g. V123 Plum, V456 Ruby). Also the colour names is being loaded from a mysql database.
 
When the name of the colour is loaded in to a dynamic box , I want to fill an object in that colour.
 
var mycol1 = V123 Plum;V123 Plum = "0xFF6600"colorchange.setRGB(mycol1);
var mycol2 = V456 Ruby;
V123 Plum = "0xFFCC00"colorchange.setRGB(mycol2);

View 28 Replies

Flash :: CS5 Wont Let Me Fill A Shape With Color

Dec 12, 2010

I am currently learning to use flash and i am following the ebook guide. On lesson 2 at the end, it requests you to select a complex shape, go to the bucket option and change the fill colour to dark brown. I tried that but the fill option has a red line across it and it cannot be selected. I need to complete this step if i want to finish lesson 2. I tried different things but it seems like the shape cannot be edited. I looked and it is not locked.[url]...

View 2 Replies

Professional :: Fill Color Stuck As Transparent?

Mar 29, 2012

I've been working in flash for an independent studies course and I've come across an issue that is halting my class's progression. My Fill Color swatch is stuck as a transparent color and when i attempt to change it by clicking a color or typing in the color's code it doesn't change. Update:

-The issue is still there, but I've found that if I click the "black and white" option it enables the ability to change the fill color again, but only after that.-

-Another issue is that the color of text is also stuck on transparent unless I go into the color window, the box that allows you to select custom colors, and select a color from there.

View 3 Replies

Actionscript :: Fill A Polygon With A Solid Color?

Oct 8, 2009

I'm building a map editor for a project and need to draw a hexagon and fill it with a solid color. I have the shape correct but for the life of me can't figure out how to fill it. I suspect it may be due to whether the thing is a Shape, Sprite or UIComponent. Here is what I have for the polygon itself:

import com.Polygon;
import mx.core.UIComponent;
public class greenFillOne extends UIComponent {

[Code].....

View 2 Replies

As3 :: Flash - Change Fill Color Of Rectangle?

Jan 19, 2012

I have a normal rectangle shape in flash. Id like to change the fill color of it using code, so I can use flashvars and be able to change the color of the shape with a few HTML adjustments.All I need to know is how to change the fill color of the shape. I've got the flashvars sorted.

View 1 Replies

ActionScript 3.0 :: Dynamically Change Fill Color

Jan 28, 2007

How can I dynamically change the color of fill for something created like this:[code]I'd like to change the fill color onRollOver, onRollOut, onRelease, etc., but I don't know which property to refer to.[code]

View 8 Replies

ActionScript 3.0 :: Random Color Fill In MovieClip

Feb 22, 2009

How can I fill a MovieClip with a random color using Actionscript 3?

View 13 Replies

ActionScript 3.0 :: Flash Click On Color Button And Write In Textarea With That Color Font?

Oct 6, 2010

I want to do as follows: * click a "red" button write in textarea with red color font click "blue" button
* write in textarea with blue color font Isn't this possible in flash 10 using AS3 I tried using setTextFormat but the problem is i have to have text before inserting format on that.

View 14 Replies

ActionScript 3.0 :: Get A Movieclip Fill Color To Change Once Clicked

May 23, 2009

I'm trying to get a movieclip fill color to change once clicked. I'm able to get the mouseover and mouseout working. But the click state isn't working properly.

Here's my code:

Code:

my_mc.addEventListener(MouseEvent.MOUSE_OVER, onFolderOver, false, 0, true);
my_mc.addEventListener(MouseEvent.MOUSE_OUT, onFolderOut, false, 0, true);
my_mc.addEventListener(MouseEvent.CLICK, showMovieclip, false, 0, true);

[code]....

When I use the above code, nothing happens once clicked. I tried using the color property, but, although that made a color change (black), it wasn't the color I had indicated (white).What I have is a movieclip ("my_mc"). Inside the movieclip are other movieclips. When one is clicked, only that movieclip ("my_mc.movieclip01"), is highlighted.

View 1 Replies

ActionScript 2.0 :: Dynamically Drawn Circle - How To Fill With Some Color

Jul 7, 2010

I am trying to dynamically draw a circle and fill it up with some color. Drawing a circle is pretty easy job for me, but fill it up with some color seems not happening today.

PHP Code:
Circle function starts
function fnDrawArc(mc,x,y,r,angle){
mc.beginFill(0xFF0000); // this is not working....
mc.moveTo(x+r,y);
for(i=1;i<=angle;i++){
[Code] .....

View 1 Replies

Beginner - Animate Color Fill Of Object Or Text

Dec 15, 2009

I am struggling to find a way to animate a fill of text in Flash CS4.  The concept I am looking for is that over a time period have the color rise from the bottom to the top.  My initial attempt was to have 2 objects, one filled with the color and the other filled with white.  I was hoping to just adjust the borders of the object or text to have it disappear, but that just reshapes the object, not cropping it.  If you know how to crop into objects and reveal the object beneath, let me know.

I am very new to Flash so hopefully it is a simple answer, but I am not seeing it yet. 

View 7 Replies

Flash :: Change Fill Color Of A Button In Code?

May 15, 2010

ActionScript 3 - CS5'm new to Flash and wondering how to change fill color from code. Something like this - btnRed.fillColor = "0xff0000"

View 1 Replies

Flex :: Getting Fill Color Inside The Itemrenderer In Adobe?

May 17, 2010

I am writing a custom item renderer to render a column series in my application.
Its a stacked chart and i want to use the same item renderer for both the column series. The color for each series in the stack is different and am setting that in the 'fill' property of the two series. My doubt is how can i get the color specified in the fill property of the column series from the item renderer. if this works then i can very well use the same renderer for both series.

View 2 Replies

ActionScript 2.0 :: Line And Fill Color Of A Drawing Object?

Jan 13, 2009

I have a movieclip containing a vector drawing, can I dynamically change the color of the fill and line in AS2, or do I need to use setRGB and divide the movieclip?

View 1 Replies

ActionScript 3.0 :: Make ColorTransform Change Only Fill Color?

Dec 29, 2009

When I use begin/endFill it work only for sprite dynamicaly drawed. So I use colorTransform to color a Sprite which is already on the stage. However all is colored. Is it possible to select what you want to color (line or fill)? I want to change only the fill color.

View 3 Replies

ActionScript 2.0 :: Make An Object Fill With Color For A Preloader?

Aug 23, 2011

I'm trying to make a preloader in which a grayscale logo fills with color based on the number of frames loaded. What I've done is make a static grayscale version of the logo named border and a colored in version on top of it named LoadBar.I have this code in frame 1,

Code:
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;[code]....

but now it's telling me this.onRelease = function () { must appear within an on handler. I thought that onRelease was an on handler.

View 8 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved