Quiz Flash need help with actionscript


Hallo,

I made a quiz in flash with four Pages:

1. "welcome to quiz," etc. with a button to GO to THE QUIZ.
2. the real test with two possible answers
3. the correct answer
4. wrong answer with link to start again.

I've added the following script to jump between the pages:

{We (Release)}
gotoAndPlay (pagenumber)
}

It works perfectly. But...

I would like to add several quiz that I figure out on my own, but I want to add a kind of counter, which, at the end of the quiz, will give a percentage or a count for example. 7/10 - 70% congratulations! or something like that.

Anyone have an idea how I wanted to write this script?

I am a total newbie Flash is told by the way!

Thank you very much!

Create an action layer that extends through all your pages and set an outcome variable...

var score = 0;

Maybe for each correct answer you increment the value 1...

score += 1;

When you arrive at the end or somewhere else, you have a textfield and you use the value of note in there somehow...

tField.text = "you answered" + score + "out 10 correctly»;»"

Tags: Adobe Animate

Similar Questions

  • New to Adobe Flash, need help with a simple coding

    I'm new using Adobe Flash and need help. That means class static type?

    static text is entered in the authoring environment.  This is the text that will not change (that's why static) during execution.

    This is in contrast to the dynamic text, which is text that is assigned using actionscript and can change at any time actionscript runs.

  • I need help with actionscript 3, sending information php to my email, Web site created in Flash pro cs5

    Hi, my name is David and I took a course to create my own website of Lynda.com by Paul Trani. After that, I created my first own webste. After that I finished it, everything worked well in flash and firefox. I have one problem or question about the power form back to send information of my website at my emailaddres. I created my website 'LisbonDreamWalking' in Flash pro CS5. I have a contact page, where people can send an e-mail for a walk in Lisbon, the date, the number of people etc. Now I want through my ISP / host funpic.org, as the entry info fields of text to be sent to my emailaddress [email protected]. My mail URL address iss: http://lisbondreamwalk.li.funpic.org This is a free webhost, so they do not work with forms as in the course, and I need some additional Info for php. Here is my HTML (Flash actionscript 3.0) to send, I don't have that red text to fill (php), I was told by the adobe course. I really hope that someone can help me? Thanks in advance!

    Instructions: 1. Add your custom code on a new line after the line that says "/ / Start your code custom" below. The code runs when the user clicks the symbol instance. * / send_btn.addEventListener (MouseEvent.CLICK, fl_MouseClickHandler_13);  function fl_MouseClickHandler_13(event:MouseEvent):void {if (thename.text == "": theemail.)} Text == ' | thetime. Text == ' | thepersons. Text == ' | TheMessage. Text == "") {thankyou.text = "Please fill out all fields';      } else {/ / create a container var allVars: URLVariables = new URLVariables();}           allVars.name = thename.text;           allVars.email = theemail.text;           allVars.time = thetime.text;           allVars.persons = thepersons.text;           allVars.message = themessage.text;           Send the info to a URL var mailAddress:URLRequest = new URLRequest ("http.www.namewebsite.com/gdform.php");           mailAddress.data = allVars;           mailAddress.method = URLRequestMethod.POST;           sendToURL (mailAddress);            Thankyou. Text = "Thank YOU!"           theName.Text = "";           Theemail. Text = "";           thetime. Text = "";           thepersons. Text = "";           TheMessage. Text = "";      } }

    H

    your code and my code are not the same.  Copy and paste the code that I have proposed.

  • fade out dynamic text only fading. Need help with actionscript

    Hi all

    I hope someone can help me. I have a dynamic text I want to fade and then fade out and then disappear in another bit of copy. My text fades but is not melted, paragraph disappears and then evokes the next paragraph suddenly. All the basic ideas on the code that I have attached here? Let me know if you need more.

    Thanks a lot for your help. I finally found it and done in a much simpler way with much less code. I used symbols that I mentioned in previous posts, following this same actionscript help basis but put my video clips on frame 1, used a stop action and ended up with PlayMC()

  • Rookie Flash needs help with error messages when you perform a simple calculator in AS3.

    I'm doing a simple calculator I followed this guide:

    http://www.YouTube.com/watch?v=5k3h37YKZJI

    It's my code.

    var Hnum:String;

    var PCnum:String;

    var calc:Number = 25;

    var Total: String;

    NUM1. Restrict = "0-9";

    num2. Restrict = "0-9";

    Est_btn.addEventListener (MouseEvent.Click, Calculate);

    function calculate(event:MouseEvent):void {}

    Hnum = num1.txt;

    PCnum = num2.txt;

    Total = parseInt (Hnum) * calc;

    Total.toString ();

    Total_txt. Text = String (Total);

    }

    I get 3 errors:

    Scene 1, Layer 'Actions', frame 1, line 141067: constraint implied a value of type flash.text:TextField to a type unrelated to a String.

    Scene 1, Layer 'Actions', frame 1, line 151067: constraint implied a value of type flash.text:TextField to a type unrelated to a String.

    Scene 1, Layer 'Actions', frame 1, line 161067: constraint implied a value of digital type to type String unrelated.

    I have two areas named num1 and num2 and box input text and dynamic text named Total_txt.

    This should be so simple, I don't really know what im doing wrong?

    Any help would be really appreciated.

    MrB

    If you look at the tutorial, I think you will see that you are using "txt" where "text" is needed.  'text' is a property of a textfield, identify the text that contains the textfield object.  I don't know if you're doing something where the num1 object contains another object named txt, but I think that my first sentence catches the problem.

  • Newbie: Receipt happy Flash - need help with embedding - onClick

    Hello

    I received a web banner from one of our suppliers that I need to integrate into our website.  I have it in the web page, but do not know how to configure an action of "onclick".  In my reading I cannot find a setting to specify the action to take if someone clicks on the banner.  Good that now it opens a new window with an error message saying that it cannot find ' / undefined.  How to set the URL?  The salesman who gave us the marketing content was of no help.

    Thank you.

    Steve

    You are / were close enough in your attempt.  I'll be honest and tell you that you are about to have a little less as much experience as I do with FlashVar... which means that I'll show you where to look (where I might look to get the answer for you):

    http://KB.Adobe.com/selfservice/viewContent.do?externalId=tn_16417

    Just be sure to include in the object and to incorporate sections of the code that they show on the page linked above.

  • Beginner, need help with ActionScript 3.0

    Hi all
    I am a newbie to flash and have little experience with OBJECT oriented programming (and therefore of action script), so I apologize in advance for my lack of knowledge. I think it is easy enough to fix, just don't know the syntax or if there is a better way to do it. Here's my problem:

    I created a flash file which has a card (like a layer of the base image) with 4 quadrants, I created separate layer (converted to a button) which corresponds to the limit of 1 of the 4 quadrants, and added a simple script, I copied and modified since a tutorial Adobe (see syntax). Instead of a new webpage to appear and the text output "I clicked" I want a new window appears with the plan of each quadrant (which is another image, jpg).

    I don't know what is the syntax to call this new image upward once your mouse over individual quadrant.

    Thank you

    Try this code. It should simplify what you want to do. Just replace the real names of new html documents that you want to open.

  • Need help with coding for HTML5 with emergency Flash video

    Hello, need help with my coding in Dreamweaver CS5.5 for HTML5 with emergency Flash video. Not sure if the coding is correct. Do I need any other JavaScript etc.?

    code.jpg

    Another thing is that you don't have to include SWF as aid manual if you provide all 3 ogv, webm & mp4 video formats as one of these formats will certainly be played in any browser that is fully compatible HTML5.

    Still one thing you could do if you don't mind hosting your video on Youtube is to get an embed code for Youtube - in this way, you don't have to convert all the files. YouTube will do it for you and it will play on devices of HTML5 as well as supports Flash player of relief for devices that cannot play HTML5.

  • Need help with Flash - really basic!

    Hi, I really need help with Flash and quick. I have to create an auto-run cd, but before I can create that, I have to make everything works! I took a class in College Flash, which up to 1 1/2 ago so im kind of knowledge missing!

    My first problem is as follows:
    I have the homepage, and it contains a button English and french.
    When you click on buttons, it brings you to the next page, either resourcesFr or resourcesEn.
    I tried to use the loadMovie script but and it works but the new page loads on the home page you can still see the English/french under buttons. How can I fix? I know its simple but I am short on time... Should I still use the loadMovie script?

    My other problem is that im trying to have another button to link to a folder. Use the script for getURL for this as well?

    Help!

    I was able to solve my problem... it was only the forward slash that were in the wrong way... so the correct code is:

    on (release) {}
    DRV = _url.substr (8.1);
    getURL (drv + ": / English/brochures");
    }

    Only took me 5 days... I think I need to buy a script book action! Laughing out loud

  • Hi, I need help with my flash mp3 player

    Hi, I need help with my mp3 player, I wan't to add the pause button... Can you help me?

    I created the button I added btn_pause and it won't work.

    function soundStatus() {}

    var amountLoaded = _root.sound_mc.sound_obj.getBytesLoaded () / _root.sound_mc.sound_obj.getBytesTotal ();

    _root. Loader.loadBar._width = amountLoaded * 260;

    duration = _root.sound_mc.sound_obj.duration;

    position = _root.sound_mc.sound_obj.position;

    _root.playHead._x = position / duration * 272 + 5;

    }

    btn_play.onRelease = function() {}

    clearInterval (timeInterval);

    _root.timeDisplay_txt. Text = "00:00 / 00:00 ';

    This._parent.sound_mc.songStarter (songfile [song_nr]);

    };

    btn_pause.onRelease = function() {}

    clearInterval (timeInterval);

    _root.timeDisplay_txt. Text = "00:00 / 00:00 ';

    This._parent.sound_mc.sound_obj.pause ();

    };

    btn_stop.onRelease = function() {}

    clearInterval (timeInterval);

    _root.timeDisplay_txt. Text = "00:00 / 00:00 ';

    This._parent.sound_mc.sound_obj. Stop();

    };

    btn_fw.onRelease = function() {}

    clearInterval (timeInterval);

    _root.timeDisplay_txt. Text = "00:00 / 00:00 ';

    (song_nr == songfile.length - 1)? _Global.song_nr = 0: _global.song_nr ++;

    _root.sound_mc.songStarter (songfile [song_nr]);

    };

    btn_rev.onRelease = function() {}

    clearInterval (timeInterval);

    _root.timeDisplay_txt. Text = "00:00 / 00:00 ';

    (song_nr == 0)? _Global.song_nr = songfile. Length-1:-_global.song_nr;

    _root.sound_mc.songStarter (songfile [song_nr]);

    };

    < proposed by the mod to as3 - kglad >

    :

    function soundStatus() {}

    var amountLoaded = _root.sound_mc.sound_obj.getBytesLoaded () / _root.sound_mc.sound_obj.getBytesTotal ();

    _root. Loader.loadBar._width = amountLoaded * 260;

    duration = _root.sound_mc.sound_obj.duration;

    position = _root.sound_mc.sound_obj.position;

    _root.playHead._x = position / duration * 272 + 5;

    }

    btn_play.onRelease = function() {}

    clearInterval (timeInterval);

    _root.timeDisplay_txt. Text = "00:00 / 00:00 ';

    This._parent.sound_mc.songStarter (songfile [song_nr]);

    };

    btn_pause.onRelease = function() {}

    clearInterval (timeInterval);  you must re - set interval when the unpause button is clicked

    _root.timeDisplay_txt. Text = "00:00 / 00:00 ';

    This._parent.sound_mc.sound_obj. Stop()

    };

    {btn_unpause.onRelease = Function ()}

    This._parent.sound_mc.sound_obj. Start(position/1000);

    }

    btn_stop.onRelease = function() {}

    clearInterval (timeInterval);

    _root.timeDisplay_txt. Text = "00:00 / 00:00 ';

    This._parent.sound_mc.sound_obj. Stop();

    };

    btn_fw.onRelease = function() {}

    clearInterval (timeInterval);

    _root.timeDisplay_txt. Text = "00:00 / 00:00 ';

    (song_nr == songfile.length - 1)? _Global.song_nr = 0: _global.song_nr ++;

    _root.sound_mc.songStarter (songfile [song_nr]);

    };

    btn_rev.onRelease = function() {}

    clearInterval (timeInterval);

    _root.timeDisplay_txt. Text = "00:00 / 00:00 ';

    (song_nr == 0)? _Global.song_nr = songfile. Length-1:-_global.song_nr;

    _root.sound_mc.songStarter (songfile [song_nr]);

    };

  • Need help with windows defender. all my files folders pictures everythiing disappeared and I find myself with this black screen and it is not all good: o)

    Need help with windows defender. all my files folders pictures everythiing disappeared and I find myself with this black screen and it is not all good: o)

    I don't know why vista windows no longer charge, or when the files and folders disappeared

    How Windows Defender is on this problem?

    Follow these steps to try to solve your problems of boot.

     

     

    Restore point:

    Try typing F8 at startup and in the list of Boot selections, select Mode safe using ARROW top to go there > and then press ENTER.

    Try a restore of the system once, to choose a Restore Point prior to your problem...

    Click Start > programs > Accessories > system tools > system restore > choose another time > next > etc.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     

    If restore work not and you do not have a Vista DVD from Microsoft, do a repair disc to do a Startup Repair:

    Download the ISO on the link provided and make a record of repair time it starts.

    Go to your Bios/Setup, or the Boot Menu at startup and change the Boot order to make the DVD/CD drive 1st in the boot order, then reboot with the disk in the drive.

    At the startup/power on you should see at the bottom of the screen either F2 or DELETE, go to Setup/Bios or F12 for the Boot Menu.

    When you have changed that, insert the Bootable disk you did in the drive and reboot.

    http://www.bleepingcomputer.com/tutorials/tutorial148.html

    Link above shows what the process looks like and a manual, it load the repair options.

    NeoSmart containing the content of the Windows Vista DVD 'Recovery Centre', as we refer to him. It cannot be used to install or reinstall Windows Vista, and is just a Windows PE interface to recovering your PC. Technically, we could re-create this installation with downloadable media media freely from Microsoft (namely the Microsoft WAIK, several gigabyte download); but it is pretty darn decent of Microsoft to present Windows users who might not be able to create such a thing on their own.

    Read all the info on the website on how to create and use:

    http://NeoSmart.net/blog/2008/Windows-Vista-recovery-disc-download/

    ISO Burner:http://www.snapfiles.com/get/active-isoburner.html

    It's a very good Vista startup repair disk.

    You can do a system restart tool, system, etc it restore.

    It is NOT a disc of resettlement.

    And the 32-bit is what normally comes on a computer, unless 64-bit.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Data recovery:

    1. slave of your hard drive in another computer and read/save your data out there.

    2. put your Hard drive in a USB hard drive case, plug it into another computer and read/save from there.

    3 Alternatively, use Knoppix Live CD to recover data:

    http://www.Knopper.NET/Knoppix/index-en.html

    Download/save the file Knoppix Live CD ISO above.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    http://isorecorder.alexfeinman.com/isorecorder.htm

    Download the Vista software from the link above.

    After installing above ISO burning software, right click on the Knoppix ISO file > copy the Image to a CD.

    Knoppix is not installed on your PC; use only the resources of your PC, RAM, graphics etc.

    Change the boot order in YOUR computer/laptop to the CD/DVD Drive 1st in the boot order.

    Plug a Flash Drive/Memory Stick, BOOT with the Live CD, and you should be able to read the hard drive.

    When the desktop loads, you will see at least two drive hard icons on the desktop (one for your hard drive) and one for the USB key.

    Click on the icons of hard drive to open and to understand which drive is which.

    Click the icon for the USB drive and click on "Actions > Change the read/write mode" so you can write to disk (it is read-only by default for security reasons).

    Now to find the files you want to back up, just drag and drop them on the USB. When you're done, shut down the system and remove the USB key.

    See you soon.

    Mick Murphy - Microsoft partner

  • Need help with video scrolling

    Hello

    I need help with a project. Subsequently, I want is that a webcam controls the position of the mouse and the mouse position

    control of a video. But I would like the part where the mouse position controls the video.

    So, if the mouse is on the left on your screen, the video will be on the first image and when you move, you're the mouse for

    the right to the video play as a result traffic. and stop when the mouse is completely right.

    Effectivly the scrolles from the mouse through the video. It must be on the x-axis.

    I'm not that formilliar with flash, so any help would be great

    THX!

    Thijs

    what you need to do, is to designate a rectangle where users can use their mouse to scroll through the video.  If this rectangle has instance name bar, you can use:

    var m, b:Number;

    var lastSeek:int = getTimer();

    flv_pb.addEventListener (MetadataEvent.METADATA_RECEIVED, f);

    bar.addEventListener (MouseEvent.MOUSE_MOVE, moveF);

    function f(e:MetadataEvent):void {}

    paramF (0,0,stage.stageWidth,e.info.duration);

    }

    function moveF(e:MouseEvent):void {}

    {if (getTimer () - lastSeek > 1000)}

    flv_pb. Seek(m*e.stageX+b);

    lastSeek = getTimer();

    flv_pb. Play();

    }

    }

    function paramF(x1:Number,y1:Number,x2:Number,y2:Number):void {}

    m = (y2 - y1) / (x 1 - x 2);

    b = y1 - m * x 1;

    }

  • Need help with drag and drop

    IM really new to this program as a

    day new hehe and I need help. im making a game quiz and your supposed

    ED to score in the hoop with a circle.  I have the

    codes for the drag and drop for the circle, but I need help with the collision between the Hoop and the ball, I want to go to the image next or gotoandPlay when the ball touches the ring. HELP PLEASE

    You should not attach code to objects.  and you can be able to happen by using a loop.

    Start by removing all the code the suggested by maqro (i.e. as3) and by removing all the code attached to objects.

    use:

    {yourobject.onPress = function ()}

    this.startDrag ();

    }

    {yourobject.onRelease = yourobject.onReleaseOutside = function ()}

    this.stopDrag ();

    {if (this.) HitTest (whatever))}

    do something

    }

    }

  • Need help with Sprite´s. (Rectangles and circle)

    Hello!

    I kinda need help with a project. I m supposed to do a script that responds to a click and moves the circle of one rectangle to another.

    (Here's a picture)

    howtosprite.JPG

    So, what I want is: when I click on the blue rectangle to the right, the circle must move instantly in the rectangle on the right. And same thing on the opposite path.

    Thanks in advance!

    -Best regards,.

    Aleksandar "Dyxir" B.

    import flash.events.MouseEvent;

    leftRec.addEventListener (MouseEvent.CLICK, fCircle);
    rightRec.addEventListener (MouseEvent.CLICK, fCircle);

    function fCircle(evt:MouseEvent)
    {
    Circle.x = evt.currentTarget.x;
    Circle.y = evt.currentTarget.y;
    }

    Note: Point for all alignment: Center

  • Need help with this gallery of xml!

    I have build a gallery but its very simple... There are pictures of the xml file.

    I have attached all the zip files.

    I just want two things if anyone can help.

    first of all when I press the next button, he's going to the next image, but without effect. It just displays the following image... I want to incorporate the effect of dragging when the image is changed to another.

    and secondly, I want to use the AutoPlay feature.

    Once swf starts images came one by one with a vertical drop of a few seconds.

    Thanks in advance... I really need help with this..!

    For the look of sliding effect using the actionscript class Tween.  Allows you to create motion tweens using the code.  The example below will be tween property _x of the instance named anObject from 0 to 300 in 3 seconds...

    import classes before using

    Import mx.transitions.Tween;
    Import mx.transitions.easing.Regular;

    TW var = new Tween (anObject, "_x", Regular.easeIn, 0, 300, 3, true);

    To implement an enforcement function auto you need to import all the images first, in the order, then you will need to use form any controlled timer, such as setInterval (with clearInterval not to need) in order to have things turn on automatically by some part-time

Maybe you are looking for

  • Not selectable in LabVIEW DAQ card

    I installed a PXI-6122 card. The device is listed as "Device is working properly" Max: Now, I want to select the device to a constant of the device in LabVIEW 2010, but is not listed there: I guess it has to do with how MAX recognizes the PXI card, s

  • Roots FileConnection and application folders names

    I read the forums, guides and the developer APIs, but I'm still looking for a few details on works on BlackBerry FileConnection. I am writing an application that will work with the configuration entry minimum of the user on all devices running 4.2.1

  • BlackBerry Smartphones Australian mobile numbers to come with the prefix + 1 when dialing within the FSU.

    Hello I work in it for an international firm and one of our directors has just returned from abroad (Asia and NZ) with this problem.  I've checked all the settings on the phone and talked with our carrier, but neither helped. I'm tempted to give it a

  • Exclude the "fieldtype" response XML element in Peoplesoft

    Hi gurus,I use core message lines for real-time integration. The response message contains the element "fieldtype" added by default.Curious to know if there is a way to remove it from the response message for all lines of basic?

  • Issue of SQL Hieraerchical

    Oracle Enterprise Version 11.2.0,.3I need to write a hierarchical query to give me registration with the version of henriq # if the record is a child of a parent. If the folder has no children so I need the parent to save himself.{code}Employee:ID Pa