Create quizzes very simple function

Greetings,

I tried to create a very simple function that records click on the buttons "right answer" and what right answers is 3, the user is taken on a label that has fine text on this. Nothing fancy, just by clicking on text (or should it be text converted to symbol?), which increments a variable and when it == 3 it goes to a label on the timeline.

Here is the code I have... but it doesn't seem to work...

i = 0;

{sym.$("ques1Yesbtn","ques2Yesbtn","ques3Yesbtn"). Click (Function ()})

i ++ ;

If (I == 1) {}

Q1 = 1;

}

If (I == 2) {}

Q2 = 1;

}

If (I == 3) {}

Q3 = 1;

}

var gotoFinishedLabel = q1 + q2 + q3;

If (I == 3) {}

read the chronology of the given position (ms or label)

SYM. Play ("finished");

}

else {}

read the chronology of the given position (ms or label)

SYM. Play ("quesHome");

}

});

Thanks much for any help!

AB

You will find a demo file download here: quizz.zip - box

A few highlights:

(1) the scene:

(2) an element:

(3) code:

Thus, a few explanations.

County of jQuery for you:

  1. because it refers to the questions together to add click event ==> sym.$(".question").on ("click", function () {...
  2. because it returns [good] answers how much I ==> var count = sym. $(".answered") .length;

I add 'responded' class to the element current ==> sym. $(this) .addClass ("answered"); I assumed that the answer is correct.

Tags: Edge Animate

Similar Questions

  • Creating a control simple closed loop

    Hello world

    I need a little help to create a (very) simple closed loop control.

    Note: I use 3 boards of Measurement Computing: a USB-2416 and two USB - TC. Measurement Computing with their own driver (called ULx), it might be a little harder to understand than the drivers NOR, but keep in mind ULx is the equivalent of DAQmx.

    I need to be out in a binary value 0 or 1 based on measures of input voltage compared to the constants of 4 channels. That is to say. If the measure of tension< 3.5="" (constant),="" send="" a="" boolean="" value="" (see="" a,="" b,="" c,="" d="" in="" attached="" photo)="" which="" in="" turn="" gets="" sent="" to="" the="" ulx="" write="" vi,="" and="" that="" outputs="" the="" binary="" value="" of="" 0="" or="" 1.="" the="" problem="" i've="" run="" into="" is="" that="" i="" need="" to="" "compare"="" single="" chanels="" from="" different="" boards,="" which="" gives="" me="" single="" boolean="" values="" for="" each="" channel.="" the="" ulx="" write="" vi="" only="" accepts="" boolean="" arrays.="" is="" there="" a="" way="" (and="" there="" probably="" is,="" i="" just="" haven't="" been="" able="" to="" find="" it)="" of="" arranging="" these="" lone="" boolean="" values="" into="" a="" boolean="">

    (see attachment for what I have so far)

    PS. I'm a COMPLETE beginner, only used LV for a week or two, so please explain everything as if I have no idea what's going on.

    Thanks in advance!

    Hello

    the attached example I did should demonstrate what you need to do.

    A few things to think about:

    1. it seems that the vis ULx return tables of signals. If so, you can select signals with the "index Board" as done in my example. Which consumes less space and does not change the type of the variant signals.

    2. If we compare the signals to your constants you will receive Boolean tables because each element of the measured signal is compared to the constant (see my example). You can then decide how to deal with this info - an another Hooray for signals :-)

    Concerning

    Florian

  • Simple function of CF, I can't write it!

    Hey guys,.

    I feel totally stupid, but I can't figure out how the code this very simple function. I use a piece of softare (salesforce) and he has two kinds of IDs, a tank of 15 and 18 tank. You can turn a tank fifteen in a tank 18 following this trueearnings.

    ---------------------------------------------------------------------------

    1. divide the 15 tank in 3 blocks of 5 characters each.

    2. for each give character this position with a value of 1 if in uppercase, 0 otherwise (lowercase or number).

    3. combine the bits of each piece into a 5-bit integer where the bit the most right is the most significant bit. This will get a number between 0 and 31 for each piece.

    4 build an array that contains the sequence of letters from A - Z and 0-5.

    5. use the integer of each piece to choose a character from the table.

    6. Add 3 characters that results, in the order of piece, at the end of the 15 char id.

    ---------------------------------------------------------------------------

    That's all I have to do. But I keep running into the stupid problems.

    Here is a link with more information and an example of chart

    https://NA1.salesforce.com/_ui/training/help/pub/UserEdSolution?ID=501300000000MX1 & retURL = e https%3A%2F%2Fna2.salesforce.com%2F_ui%2Ftraining%2Fhelp%2FCombinedSearchPage%3Fstr%3Dreco % 2Bid % B 2, 18 & p = 1 & orgId = 00D 000000000062

    Here's a post with a basic example

    http://reuvenab.blogspot.com/2009/03/convert-15-character-Salesforce-IDs-to.html

    Attached is my code, but for some reason any the table continues to try to treat the string to a number or something and sticks, some of the front of the number 1 instead of adding them as it should.

    <cffunction name="ExpandSFID" hint="I take a 15 char salesforce ID and turn it ino the 18 char one">
         <cfargument name="SFID" type="string" required="yes">
         <cfoutput>
         #arguments.SFID#<br>
         <cfset InChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ012345">
         <cfset InUpper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
         <cfset ChunkTotal = arraynew(1)>
         <cfset ChunkTotal[1] = "">
         <cfset ChunkTotal[2] = "">
         <cfset ChunkTotal[3] = "">
         
         <cfloop from="1" to="3" index="i">
              <br>
              <cfloop from="1" to="5" index="j">
                   Char #J# of Chunk #i# is #right(left(arguments.SFID,(i-1)*5+j),1)#<br>
                   <cfif find(right(left(arguments.SFID,(i-1)*5+j),1),InUpper) GT 0>
                        Adding 1 To Chunk #i#<br>
                        <cfset ChunkTotal[i] &= "1">
                        <cfelse>
                             <cfset ChunkTotal[i] &= "0">
                   </cfif> 
                   CHUNK IS #CHUNKTOTAL[i]#<br>
                   <cfset ChunkTotal[i] = reverse(chunkTotal[i])>
              </cfloop>     
         </cfloop>
         </cfoutput>
         
         <cfdump var="#ChunkTotal#">
         <cfreturn ChunkTotal>
    </cffunction>
    

    Thanks to a bouquet.

    A few observations.  The first is the most important:

    (1) look carefully where you make your call reverse().  Are you sure that you do it in the right place?  You want to invert your string whenever you add to your piece, or you want to reverse your piece together once you have finished?

    (2) you should study the mid(), rather than make the combo right () /left () function.

    (3) always VAR your variables in a function.

    (4) I would not do this:

    Find (right (left(arguments.) SFID,(i-1) * 5 + j), 1), InUpper)

    I could do this:

    c = mid (arguments.sfid, ((i-1) * 5) + j, 1)

    Find ("^ $[A - Z]", c)

    5) rather than write the pieces in the form of binary numbers, reverse, then convert them in full, you could do this in one fell swoop.

    -in the first loop

    -ChunkTotal [i] the value zero

    -Have the loop internal, run from 5-1, not 1-5

    -instead of adding a 1 or a 0 to ChunkTotal [i], ADD this: 2 ^(j-1).

    -After the loop, you will have the integer you were after in the first place.

    Make sense?

    --

    Adam

  • Help: HTTPService very simple edition

    I've created a very simple test:

    <? XML version = "1.0" encoding = "utf-8"? >
    "" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml ' layout = "absolute".
    Width = "100%" height = "100%" >

    < mx:Script > <! [CDATA]
    Import mx.rpc.http.HTTPService;

    [Bindable]
    public var srv:HTTPService;
    []] > < / mx:Script >

    < mx:Label text = 'Works is - this?' / >
    < / mx:Application >

    This application is rendered by tomcat here: http://jc.studiogdo.com (you can test)

    The HTTPService is declared, you can see that nothing is made! On a local computer (tomcat running on my localhost), and then it works on IE. On a real server as in this example, nothing works! Of course, without declaring the HTTPService everything works... I created this example with Flex Builder2 on eclipse

    useProxy is false, so no need for a crossdomain.xml. Where is the error?

    Thank you much for the help...

    In fact when using simple HTTPService, Flex Data Service should be used (FlexSwfServlet instead of tomcat servlet by default...) otherwise strange behavior occurs

  • Simple function to create ToolTip in Actionscript 3

    Hello

    I'm new to Actionscript 3 and I'm creating an application in which I need to use tooltips.  I thought it would be simple because in VBA and other object-oriented languages, you have a tooltip for a button and all property you need to enter the text (or even schedule it, which is very simple).  However, I can't seem to create tooltips in Flash using AS3, I tried 6 different methods (fairly complex) from code I found online but could get any of them to work.  Can someone please give me a simple function that takes as parameters the ToolTip text and the original button, then the right function creates the ToolTip automatically once it's called? Any help would be greatly appreciated. Thank you.

    If the two functions add and remove are on the same timeline you will not see this error message.  but I see typo:

    create a buttonObj for all your buttons

    var buttonObj:Object = {};

    //////////////////////////////////////change nothing above ////////////////////////////////////

    the next 3 lines must be made for all your buttons

    buttonObj [yourbutton] = ['Hello', 2, 2];

    yourbutton.addEventListener (MouseEvent.MOUSE_OVER, addToolTipF);

    yourbutton.addEventListener (MouseEvent.MOUSE_OUT, removeToolTipF);

    change nothing below.

    function addToolTipF(e:MouseEvent):void {}

    var a: Array = buttonObj [e.currentTarget];

    var tf:TextField = new TextField();

    buttonObj [e.currentTarget] .push (tf);

    TF. Text = a [0];

    TF. Multiline = false;

    tf.autoSize = "left";

    TF. Border = true;

    addChild (tf);

    TF.x = a [1] + e.currentTarget.x;

    TF.y = a [2] + e.currentTarget.y;

    }

    function removeToolTipF(e:MouseEvent):void {}

    removeChild(buttonObj[e.currentTarget][3]);

    buttonObj [e.currentTarget]. splice (3,1);

    }

  • New user trying to create this simple function of Xcode

    I'm a programmer windows trying to learn Xcode / swift.

    How can I get this simple function to work?

    He complains about the pi in the line "access to".

    I hope this is enough information.

    Thank you

    disp_to_acceleration Func (freq: Float, disp: Float)-> {Float

    Let pi = M_PI

    Let accel = disp * 2 * powf (freq * pi, 2.0)

    Back to accel

    }

    Oops error in the post "Let's accel.

  • How can I add two very simple Questions to a slide?

    Hello

    I would like to be able to add two very simple questions to a slide, but don't know if (or how) this can be achieved. I've explained this more in detail below:

    ====================================================================================

    Scenario of

    The slide must contain two questions:

    Question 1: with two check boxes for the options Yes and No

    Question 2: with five check boxes for options 1 2 3 4 and 5

    A button (for example named Submit) to verify the responses from users by triggering a tip Action that verifies the radio buttons that have been selected.

    ====================================================================================

    The checkbox Widget looks like it could work for this scenario, because it allows each value to be assigned to a variable. However, when you try to put in place the tip Action I couldn't see all the variables I named in the checkbox Widget.


    If anyone has done this kind of thing before and can offer advice on the best way to create custom questions, I'd appreciate any help.


    For reference, I use 8 Captivate.


    Thank you


    Ross

    I indeed used interactions of checkboxes or radio buttons many times for this kind of slides. That's why I'm confused and I first want to know if you want an answer to the second issue as well? For the first question, it is clear that you need an interaction of option buttons, I don't know if you want to allow more than one choice for the second question. Only when you need to allow more than a choice will you have the interaction of check boxes, in the other scenario, option buttons will do the trick. It makes a big difference, because the radio button widget has only one associated variable that will store the selected element. For the widget checkboxes, you need a variable for each choice.

    Maybe my blog could help clarify, you can also download a descriptive table with all interactions of CP8 training

    Advice - Training interaction - Captivate blog

    BTW, I moved this thread to the Quizzing subspace.

  • Very simple question and CVI-program

    Hello

    I just started working with CVI, and as far as I can see, the principle underlying the interaction between various components is similar as in Delphi. I made a very simple example (Application of User Interface), containing a square button and a digital. My idea was to push the button, after which the DIGITAL controller displays a number. However, I can't figure out how to build a change of the function that is executed when you press the button. I tried a double click, right click, etc, but I couldn't understand it. I hope my question makes sense.

    Have you had a look in Chapter 2 of the getting started manual?

  • forms with calculations and other simple functions stop working [Android]

    everyone has experienced problems with their forms?

    my forms had simple functions created in acrobat xi and used on mobile devices with success for several years and now with acrobat reader DC nothing works.

    All solutions?

    Unfortunately, none of the DC/Adobe Acrobat Reader version works with Javascript active on Android 5.0 form fields. 5.1 Android has already been deployed by some OEMs and if all goes well, you should see an update on your device quickly. We regret the inconvenience caused to you.

    Thank you.

  • MS Word opens when I try to get a glimpse of a very simple project

    Hello

    I'm just getting started with Captivate 8. I created a project of a slide... it's very simple, but the text... and tried to preview it. When I click on preview project option, MS Word opens a file called rindex.html and Captivate does not give me the preview mode.

    * I have more than enough disk space

    * I'm saving the project to my office, not a network drive or an external hard drive

    Any ideas what could be causing this?

    Thanks for your help.

    Looks like the HTML files are configurΘ to dΘmarrer with the Word on your system, very weird, but users sometimes do strange things.

  • Issue of Migration cold very Simple...

    Hey guys,.

    I'm relatively new to VMWare, infact, I take the vcp - 310 exam tomorrow, lucky me!  In any case, I have a very simple question, basically I can't find all the information on how to do a migration cold or in fact if it is the right solution to my problem.  I rebuilt my server ESX (3.5) and kept the VMFS volume local orginal up thanks to its VMs located on it.  Now, I want to attach them to the newly installed ESX, I can easily create new ones and add the drive but that is not the same, for example will be difference NVRAM, VMX, etc. files.  Is "cold migration" what I'm looking for?  Or is there another way I can fix this?

    Thanks in advance for your help.

    See you soon

    Neilos

    witch hunt... Just find the data store in which the virtual machine is on, browse this data store, find the virtual computers folder and inside you will see a .vmx file.  Right click on that and choose 'Add to inventory' and follow the prompts.

  • How to make a simple function on the liberation of a mouse AS3.0?

    so its been a while that I was Flash Professional and I'll have to re - educate myself in almost everything. what I want to do is to create a simple function of the liberation of a mouse click vs what is the command to access freedom I know the click is MouseEvent.CLICK, function, but what is the command to access release on?

    You probably want to use MouseEvent.MOUSE_UP (which is what happens to define the end of a CLICK event)

  • Imagegallery VERY simple as3

    I'm trying to do a very simple imgegallery for an iPaper.

    I made this script, but its does not work.

    Stop();

    addEventListener (MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame);

    function fl_ClickToGoToAndStopAtFrame(event:MouseEvent):void { }

    pict1_BT:

    gotoAndStop (1);

    pict2_BT:

    gotoAndStop (6);

    pict3_BT:

    gotoAndStop (11);

    };

    Can someone help me please?

    I am a beginner in AS3...

    Can you explain what your code is trying to do.  When you assign an event listener, you generally assign it to an object by using its instance name.  So maybe you want to do something like the following...

    Stop();

    pict1_BT.addEventListener (MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame);

    pict2_BT.addEventListener (MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame);

    pict3_BT.addEventListener (MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame);

    function fl_ClickToGoToAndStopAtFrame(event:MouseEvent):void {}

    switch (event.currentTarget) {}
    case pict1_BT:

    gotoAndStop (1);

    break;
    case pict2_BT:

    gotoAndStop (6);

    break;
    case pict3_BT:
    gotoAndStop (11);

    break;
    by default:
    a default location to go to

    }

    }

  • Very simple ExternalInterface problem :)

    Hello world

    I have a simple question/problem here that in my opinion should be very easy to fix, but I can't find examples of work there!

    What I have now:

    A simple .swf with a function that makes a movieclip (ball_mc) moves to the right called when a button is clicked in the html page:

    import flash.external.ExternalInterface;
    import flash.events.Event;
    
    ExternalInterface.addCallback("sendDataToFlash", moveBall); 
    
    function moveBall():void 
    
         {
              ball_mc.x = ball_mc.x + 20;
         } 
    

    And in my html, I have the following javascript code:

    <script>
    function moveBallOnClick() {
    getFlashMovie("ExternalInterfaceExample").sendDataToFlash();     }   
    </script>
    

    And then I call this function as follows:

    <form>
    <input type="button" onClick="javascript:moveBallOnClick();" value = "Move Ball" />
    </form>

    AND IT WORKS BEAUTIFULLY!

    It's just a simple button and I have a click and move the movieclip

    What I want to do:

    Instead of using the button on the form, I just want to do exactly the same thing but with a hyperlink instead.

    I use the button on the form in my html code now is because after 5 days of internet research, I just could not find a single example of running only a simple function. They were all examples of the sending of forms of text and so on, so I just simplified there from there.

    I want to just do exactly what Im doing now, run the function moveBallOnClick, but not with a form button, just with a normal hyperlink!

    Thank you very much in advance for anyone who can take a look at my problem and may offer assistance :)

    Good bye

    I think that you can just do something like this:

    Move the ball

  • Help to create a necessary simple logo...

    Hi all

    I'm looking for someone willing to help create a simple logo to Illinois. I have a logo that someone had drawn for me paper. I took a picture of the draw and now need to create in Illustrator, but don't know Illustrator.

    I'm looking for someone who is ready to help and to give time (it is a very simple logo, I can upload an image) without me. I can help you in return in Photoshop, Lightroom, Dreamweaver or Flash...

    Thanks for the attention. If anyone is interested, I can download the file here to send it to the e-mail address of someone.

    Attached, you have only one attempt, I did. Some research on Google for ying yang logo¨ ¨drawing this will give ideas on how to draw what you need.

Maybe you are looking for

  • remove the battery in edit mode

    In the editing screen (left SHIFT + down) how to take something from the stack and the echo in the editing program?  I used to use a 48sx and you can do it, but I don't see how on the 50g.

  • I want to import my favorites of my Google Chrome browser.

    The only option under "import bookmarks" is MSIE. How can I import bookmarks from Chrome?

  • VAIO Update 6 gives error erraneous

    Hello Lately, my software VAIO Update 5 keeps producing an error which reads: "Cannot acquire the configuration settings for VAIO Update." When the application opens and begins first searchign for updates. My version of the App is 5.0.0.12090 and my

  • change from 32-bit to 64-bit on windows 7

    Initially, I installed my Windows 7 with 32-bit but have since added more than memory and want to change to 64-bit.  How do I go about it?

  • Upgrading processors Inspiron 1525?

    Can I switch my laptop an Intel Pentium Dual Core T2390 1.86 GHz processor to a processor at 2.0 GHz? If so, what would be the processor recommended for upgrade? Thank you :D