Referring to several items in the tables

I'm experimenting with a q / a Flash application. TextField shows a question. Another inputfield is lower for answering. By responding with a text, a sentence not formulated may be correct, but not according to the code. In this case, I want to write many different versions of the response. Questions come from a table. Another painting shows the answer.

For example

questions of the var: Array = new Array;

issues [0] = ('how many cars');

answer: Array = new Array;

answer [0] = ("one", "1", "One", "ONE")

The case:

In a function where an if statement expected the inputfield to have the right answer, how to write the code?

Example:

(...) function send (MouseEvent) {}

If (inputField is?) {}

else {trace ("wrong")}

}

Posted by phone, my computer with the actual code has no internet... Must have downloaded the code that I know...

What you are looking for is perhaps

If (answers [currentQuestionNum] .indexOf (inputField.text) >-1) {}

something

} else {}

trace ('wrong');

}

Tags: Adobe Animate

Similar Questions

  • How can I search and return several items from the table quickly (like Matlab find)?

    Hi, I'm a pretty experienced Labview programmer, and I've always wondered if there is a way to quickly search for pictures on several items that meet the selection criteria, equivalent to the Matlab find command.  While my inability to do in Labview has always annoyed me, I now have an application that requires this capability and I need to find a solution.

    Is the fastest way I've found to do this in labview to perform comparisons on the data vectors, then use the Boolean value that results from vector to analyze the table using a loop and shift registers.  I enclose an extract vi a analysis comparative vi to one of the simple searches that I need to do.  On my laptop, this research takes about 600 ms.  In comparison, the equivalent in Matlab:

    newArray=oldArray(find(oldArray(:,4)./oldArray(:,2)>1.5),;

    runs in about 1.2ms.  So, the way I am doing this in Labview is only 400 times slower

    Needless to say, I need to make these types of research many times, and these additional 599 ms start to add up pretty quickly!

    Thanks for your help,

    Aaron

    Hi Aaron,

    the slow part is probably "build group" of the node in the loop.

    Try this:

    Define an array the same size as the input data (or simply uses a copy of it) and the wire that to the shift register. Keep a counter of lines found in the loop. Use IndexArray and ReplaceArraySubset for the loop to move rows found at the beginning of the table (overwrite the 'bad' lines). After the loop simply ReshapeArray the number of found lines...

    Sorry, don't have LV (2009) on hand for editing your snippet.

  • E/s files does not save the items in the table

    I can't save the items in the table. If I quit the program and restart it, the array starts at 0 again. I want it from the value at which it stopped.

    Is this a flaw in the Subvi "Timer A1"?

    Thanks for the help.

    mhaque

    Your feedback nodes are defined overall boot on the first call, as evidenced by the glyphs.  If you are stop and start your program, must be configured to initialize worldwide on the compilation or the load, simply right-click and change the setting.  This should give you the behavior you're looking for, but does not exclude the intrinsic problems with the code.

  • remove items from the table and resize the matrix

    Hello, I'm new to Labview so I'm struggling with ideas. I have the following matrix

    A = [1 2 3 4

    5 6 7 8

    9 10 11 12

    13 14 15 16]

    I want to get only follows resized in a matrix with items 6, 7, 10 and 11, that is

    B = [6 7

    10 11]

    I appreciate your help

    On the table-online matrix palette, there is a function to get a submatrix.

  • ADF: How to convert column ADF output text to link to the item in the table?

    Hello world

    I use Jdev 11 G.

    I dragged VO as adf read only the table that is to have 10 columns.
    now my requirement is to convert the first column "empid" to link the item.
    How can I convert this column as a link?

    and one more thing by clicking on this link, we should sail to OAF page from empid as parameter.
    How can I achieve this?

    Any answer will be really useful.

    Thank you.

    In my opinion, using af: goLink is the right option when you call a page of the outsider.
    you do not download workspace sample & test it provided link?
    You can select yr af:commandLink in the Structure window & do a right click to select "create a binding of the action method.
    In the open dialog box you can choose the "connection method" & then name the bean with the same method name generated by the IDE.

  • Place the items in the table next to each other on stage

    Hey guys,.

    I know I have to do something wrong that is easy and simple to fix, but I can't fix.

    I have a table called a frame of a movieclip and I want to place each image as a 'menu' on the stage.

    The problem I have is that I want to put each item in menu next to each other, but the only code I could find work is the 3D carousel.

    So I try to adapt this code to my needs.

    Where I'm going wrong? Any help would be great.

    Code below:

    package classes

    {

    import flash.display.MovieClip;

    com.greensock.*;//for interpolation ability to import

    import com.greensock.TweenLite;

    com.greensock.easing import. *;

    import flash.filters.BlurFilter;

    import flash.events.Event;

    import flash.utils.Timer;

    import flash.events.TimerEvent;

    import flash.display. *;

    import flash.events. *;

    import flash.sampler.StackFrame;

    SerializableAttribute public class extends MovieClip MenuSystem

    {

    private var blur: BlurFilter = new BlurFilter (0,0,1);

    private var holderMc:MovieClip = new MovieClip();

    private var radiusX:uint = 1200; / / width of the carousel

    private var rayonY: uint = 400; / / height of the carousel

    private var centerX:Number = 100; / / x position of the center of the carousel

    private var centerY: Number = 350; / / the position there from the center of the carousel

    private var speed: Number = 0.01; / / initial rotation of the carousel speed

    private var itemArray:Array = new Array(); / / store the items to sort them according to their 'depth' - see the sortBySize() function.

    public var navigationPopupInfo:NavigationPopupInfo = new NavigationPopupInfo();

    public void MenuSystem()

    {

    the constructor code

    We do support for the menu system serve

    addChild (holderMc);

    holderMc.y = - 200;

    Also add a listener to control the rotation of the speed menu

    / * addEventListener (MouseEvent.MOUSE_MOVE, OnMouseMoveHandler);

    */                    }

    public function initNavigationPop (): void

    {

    TweenMax.to (navigationPopupInfo, 0, {alpha: 0, 40-y:, blurFilter: {blurX:3, blurY:10}});}})

    holderMc.addChild (navigationPopupInfo);

    navigationPopupInfo.x = (-navigationPopupInfo.width / 2);

    TweenMax.to (navigationPopupInfo, 2, {delay: 1, alpha: 1, y: 10, ease:Elastic.easeOut});})

    TweenMax.to (navigationPopupInfo, 1, {delay: 1, blurFilter: {blurX:0, blurY:0}});}})

    }

    Place the vital elements on stage

    public void initRange(numOfMenuItems:Number):void

    {

    for (var i: uint = 0; i < numOfMenuItems; i ++)

    {

    var arrayBoxItem:String = ('model' + (i + 1) + '_');

    var itemMc:ItemMc = new ItemMc();

    public var angl:Number; belongs to the class of the element.

    Item class extends ItemInner in the library FLA.

    itemMc.angl = i * (400 / numOfHomeRangeItems);

    itemMc.alpha = 0.8;

    itemMc.name = (arrayBoxItem);

    trace (itemMc.Name);

    holderMc.addChild (itemMc);

    itemArray.push (itemMc);

    itemMc.itemHitter.buttonMode = true;

    itemMc.addEventListener (Event.ENTER_FRAME, enterFrameHandler);

    Listen MouseEvents only on the icons, not on reflection;

    itemMc.itemHitter.addEventListener (MouseEvent.CLICK, clickHandler);

    itemMc.itemHitter.addEventListener (MouseEvent.ROLL_OVER, rollOverHandler);

    itemMc.itemHitter.addEventListener (MouseEvent.ROLL_OUT, rollOutHandler);

    itemMc.iconMc.gotoAndStop (arrayBoxItem);

    }

    }

    public void clickHandler(event:MouseEvent):void

    {

    clean your audience before doing anything else to release

    the user CPU resources

    for (var i: uint = 0; i < itemArray.length; i ++)

    {

    var itemMc:ItemMc = itemArray [i];

    itemMc.removeEventListener (Event.ENTER_FRAME, enterFrameHandler);

    itemMc.itemHitter.removeEventListener (MouseEvent.CLICK, clickHandler);

    itemMc.itemHitter.removeEventListener (MouseEvent.ROLL_OVER, rollOverHandler);

    itemMc.itemHitter.removeEventListener (MouseEvent.ROLL_OUT, rollOutHandler);

    Optional:;

    TweenLite.to (itemMc, 1, {scaleX:0, scaleY: 0, alpha: 0.1, ease:Elastic.easeInOut});})

    TweenMax.to (itemMc, 1, {blurFilter: {blurX:5, blurY:5}});}})

    to replace the carousel again see function reInit()

    FIND A WAY TO REMOVE ITEMS

    this.removeChild (itemMc);

    }

    Tabula Rasa, to prepare variables

    var variantName:String = event.target.parent.name;

    itemArray.splice ();

    If (variantName == "backBtn") {MovieClip (root) .reinitMenuSystem () ;}

    else {MovieClip (root) .addVariantPage (variantName) ;}

    }

    /////////////////////////////////////////////////////////////////////////////// /////////////////////// POSITION ITEMS IN CAROUSEL

    position items in the Menu

    public void enterFrameHandler(event:Event):void

    {

    Event.Target.x = centerX; / / position of the element x

    Event.Target.y = centerY / / position point y of

    Scale according to position point there to give the point of view

    / * var s:Number = event.target.y / (centerY + rayonY);

    event.target.scaleX = event.target.scaleY = s;

    Event.Target.angl += speed; / / speed is updated by OnMouseMoveHandler

    ADD DOF

    blur.blurX = - event.target.y / 10 + 21;

    blur.blurY = - event.target.y / 10 + 21;

    Event.Target.filters = [blur];

    Finally set the size of the elements

    sortBySize();

    */                    }

    /////////////

    Check the progress of ticks

    / / / TRI SIZE DETERMINE DEPTH OF ELEMENTS

    set the display list index (depth) of the elements according to their

    scaleX property so that the element, the index is high (depth)

    / * public function sortBySize (): void

    {

    It is not a property Array.ASCENDING DECLINING use and reverse()

    itemArray.sortOn ("scaleX", Array.DESCENDING |) Array.NUMERIC);

    itemArray.reverse ();

    for (var i: uint = 0; i < itemArray.length; i ++)

    {

    var itemMc:ItemMc = itemArray [i];

    holderMc.setChildIndex (itemMc, i);

    }

    }

    */

    /////////////////////////////////////////////////////////////////////////////// /////////////////////// ITEMS WHEN ROLLOVER & OUT

    public void rollOverHandler(event:MouseEvent):void

    {

    var currentModel:String = event.target.parent.iconMc.parent.name;

    Event.Target.parent.alpha = 1;

    TweenLite.to (event.target.parent.iconMc.tooltipMc, 1, {alpha: 1, y:-40, ease:Elastic.easeOut});})

    event.target.parent.iconMc.tooltipMc.tipHeader.gotoAndStop (currentModel);

    }

    function rollOutHandler(event:MouseEvent):void

    {

    Event.Target.parent.alpha = 0.8;

    TweenLite.to (event.target.parent.iconMc.tooltipMc,.5, {alpha: 0, y:-27});})

    }

    / / / ITEMS IN THE CAROUSEL MOVEMENT ACCORDING TO THE POSITION OF THE MOUSE

    /*

    Update of the speed at which the carousel turns accoring to the distance of the mouse since the center of the stage. The variable speed is only updated when the mouse is over the point Sprites.

    */

    / * function mouseMoveHandler(event:MouseEvent):void public

    {

    Speed = (mouseX - centerX) / 20000;

    }

    */          }

    }

    I have a table called a frame of a movieclip and I want to place each image as a 'menu' on the stage

    This code will take a MovieClip in your library with the link ("Menuitem") that has 5 labeled keyframes "menuitem 1 «...» "" menuitem 5 ', it is adapted accordingly to your stagesize and distribute, and align the elements at the top from left to right:

    I havemport flash.display.MovieClip;

    var menu_Array:Array = new Array();

    the var menu: MovieClip = new MovieClip();

    var stageWidth:int = stage.stageWidth;

    var menuWidth:int = 0;

    for (var i: int = 0; i<5;>

    {

    var menuItem:Menuitem = new Menuitem();

    menuWidth += menuItem.width;

    menu_Array.push (MenuItem);

    }

    function distrbuteAndAlignItems(_menu:MovieClip,_array:Array):void

    {

    var scaleFactor:Number = stageWidth / menuWidth;

    var xAdjustment:Number;

    trace (scaleFactor);

    for (var j: int = 0; j<_array.length;>

    {

    MovieClip(_array[j]).scaleX = MovieClip(_array[j]).scaleY = scaleFactor;

    for (var k: int = 0; k

    {

    xAdjustment += MovieClip(_array[j]).width;

    }

    _ARRAY [j] .x = xAdjustment;

    _ARRAY [j].gotoAndStop(j+1);

    xAdjustment = 0;

    _Menu. AddChild (_ARRAY [j]);

    }

    addChild (_menu);

    }

    distrbuteAndAlignItems (menu, menu_Array);


    If that's what you're looking for...

  • remove items from the table

    Hi all

    If I have the table as

    var my_Arr:Array = new Array ("a", "b", "c");

    and I have a button to use a random element of the array of ths, y at - it no to remove this element if I press the button once again I don't think the last item?

    could someone help me...?

    thnx

    Wael


    var someArray:Array = [1,2,3,4,5,6,7,8,9];

    someArray.shift (); remove the first value (1)

    someArray.pop (); remove final value (9)

    If you type: untableau. then comes a list of possibilities and you can see that makes each of them, e.g. .reverse probably reverse the table e.g. 9, 8, 7... etc.

  • Several items with the PHP URL parameter

    Hi, I am a novice PHP, using dreamweaver only do any programming. I have a page showing 10 products, and within each product, I have a checkbox dynamic named "checkbox" which is linked to the product id. When the user selects multiple checkboxes, I want to display the results on the results page by using a URL parameter. I can get the page to send the url like this:

    CheckBox.php? CheckBox = 100000 & Case = 100100 & box = 100200 & box = 100300 & box = 1010 23Submit = Submit

    I can't figure out how to get more than one display item. I searched and read countless forum entries, but nothing I can work with.

    Here is the form on the home page;
    < do action = "checkbox.php" method = "get" name = "checkbox" > "
    < input type = "checkbox" name = "checkbox" value = "<?" PHP echo $row_rs_products ["Item"];? ">" / >

    On the checkbox.php page, the recordset is:

    SQL: SELECT *.
    PRODUCTS
    WHERE Item = 'products '.
    ORDER BY point CSA

    Variables:
    name of column-$1 _GET ['checkbox']

    Any help is appreciated.
    Thank you
    Roger

    huntlok1 wrote:
    > I get the page to send the url like this:
    >
    > checkbox.php? checkbox = 100000 & = 100100 checkbox checkbox = 100200 & checkbox = 100300 & che
    > ckbox = 101023Submit = Submit
    >
    > I can't figure out how to get more than one display item.

    It's like saying: I'll have a beer. No, I'm getting red wine. No, I'll
    have a cherry brandy. Uh, no, make it a flaming lamborghini.

    Each variable must have a different name. Otherwise, the last one being always
    WINS.

    Since you're using PHP, change the name of your boxes something
    like products []. The empty pair of brackets turn products into
    a table. In your page, you must then activate the table in
    something that your recordset can use.

    > On the checkbox.php page, the recordset is:
    >
    > SQL: SELECT *.
    > From products
    > WHERE Item = 'products '.
    > ORDER BY point CSA

    $products = implode (',', $_GET ['products']);

    SELECT *.
    PRODUCTS
    WHERE point IN ($products)
    ORDER BY point CSA

    --
    Adobe Community Expert David Powers
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Automator: using a text file to set several items from the finder?

    Hello

    what I would do:

    I have a text file that contains multiple entries for files and folders, each on a separate line. I want to dragndrop this file on an automator action, he should ask me a destination folder and then copy all the files and folders in this folder.

    I have my action, automator, set up like this:

    Elements of the open Finder

    Get the content of the TextEdit Document

    Copy to the Clipboard (I have not found another way to keep my text sort file values and let it not be crushed by the following, but it works)

    Quit the Application (TextEdit)

    Ask the Finder items (this requires a destination folder)

    Set the value of the Variable (Destination)

    Get the contents of the Clipboard

    Copies the items from the Finder (at Destination)

    It all works, but only when there is 1 entry in my text file. As soon as I have 2 lines of text, I get the following error message:

    The action "copy Finder items" has not provided with the required data.

    How can I make this work with multiple entries?

    The problem is that you only pass the only element to the copy action (you have copied text), instead of an element for each line (paragraph) in the text.  The solution is to use the action filter paragraphs to break up along the borders of paragraph text, which will give you a list of items.  In addition, you do not necessarily have to use TextEdit or the Clipboard - If you already have a file somewhere, you can simply use the action to combine text files to read the text.

    With the above modifications, your workflow should look like:

    Ask the Finder items  (ask for a destination folder)

    Set the value of the Variable  (Destination)

    Ask the Finder items  (Download text files) - set the action to ignore the entry

    Combine text files  (read the text files)

    Filter paragraphs  (paragraphs which are not empty return)

    Copy the items to the Finder  (at Destination)

  • Disable "insert the front element / remove item ' in the table

    Hello guys.

    It is possible to deacitvate function "insert the front element / delete" appears after right-clicking on a table in the front?

    "Description and trick" should stay.

    Thank you.

    Alex

    You can customize the context menu to remove elements of the request and keep others:

    Click on the table (and not on the array element!) in the Panel and select Advanced-> Menu contextual Run - Time-> Edit...

    This brings the context Menu Editor:

    Change the control drop-down menu of "Default" to "Custom".

    Select it "?" line in the tree on the left control.

    on the right, change the element Type of the "user position" «Application point-> Description and Tip...» »

    It automatically fills the corrent name and the tag.

    Save the rtm either in a file or in the control.

    LV will automatically manage elements of the application in the control, any necessary events.

    I sometimes find the function "Menu copies" of the context menu very useful if I want to just disable some elements.

    http://zone.NI.com/reference/en-XX/help/371361G-01/lvconcepts/customizing_vis/#Customizing_Menus

  • Coloring items in the table of clusters

    Hello

    I have an array of clusters.

    My goal is that each element (cluster) in the table will have a different background color.

    I tried to use the color property node, but it changed the color of all clusters (not only the desired element).

    How is it possible?

    (cliché of the attached table)

    Thank you

    Leonid

    Select the color box visit the reorganize (kind of refreshment of the icon, or press Ctrl + J ) and select move to the rear. You are finished.

  • Can TOC close automatically by clicking on an item in the table of contents?

    Would be nice if the TOC closes when a user makes a selection of this TOC by clicking on an element.

    The current behavior is that after clicking on the chosen page opens, and the user must close the table of contents manually...

    CP 6.0.1.240 version

    OK it's resolved! He discovered myself

    Assigned to a tip Action at the entrance to each slide that locks the table of contents

    Affect of--> cpCmdTOCVisible with 0

  • Graphics as of valid items in the tables

    I am a Framemaker book structured with some of the chapters have tables with graphics in them. However, the system does not recognize the graphics in the cells of table as valid elements. Anyone out there have any ideas?

    tsuholic,

    It is the rules in your EDD. Graphics (specifically, anchored frames) can certainly in the tables, as long as your structure definition says. As I don't make ESD, I can't offer much more assistance, other than to say that it is possible and the rules resemble graphic standards anywhere elsewhere in a structured workflow.

    Russ

  • Find the active item in the table in advance by clicking on the button

    Hello friends,

    I need a urgent who...

    (1) I have a search page, when I click on the go button that all search results must fill in the region of the table.
    (2) all ranks with the username, firstname, lastname, email, etc and a Disable button user
    (3) assume that the user can click any line and click the button disable the user that the user should be disabled by calling the Api Oracle
    here my code everything is ready, I am odious to get the user name of line... and then to the api oracle paas


    If (PageContext.GetParameter ("DIsableUser")! = null)
    {
    TXN OADBTransaction = am.getOADBTransaction ();
    CallableStatement callablestatement1 = txn.createCallableStatement ("start FND_USER_PKG. DISABLEUSER (?); end; ", 1) ;
    System.out.println ("procedure1 is:" + callablestatement1);
    Try
    {
    callablestatement1. SetString(1,username);
    callablestatement1. ExecuteUpdate();
    callablestatement1. Close();
    TXN.Commit ();
    }
    catch (System.Exception e)
    {
    throw new OAException (e.getMessage (), OAException.ERROR);
    throw new OAException ("POS", "MODPOS_SUPPLIER_EXIST");
    }


    }
    }

    very urgent... can all give a solution.

    Thank you
    Krish.
  • Topics in several places in the table of contents

    Hi all

    I was wondering if it is possible to insert a topic more than once in the Table of contents? This is probably a strange request, but the problem occurred because I imported a manual written in Word, but the part of it contains information already in the RoboHelp project. I was wondering if I could erase the information duplicated in favor of a link to what was already there?

    Thanks in advance for your suggestions.

    See you soon,.

    darkagn

    Stone of right: the table of contents will be get synchronized with the trial (up and down) that he meets. However, you can use redirect pages to work around this problem.

    1 create a new topic (and name it target_topic_name_redirect.htm as a visual cue for yourself). The title is the same in the topic title target (which is the name that will appear in the table of contents).

    2 remove all text in the topic in WYSIWYG mode (leaving a blank page).

    3 al ' TrueCode, add this line to the other META tags (in any place).

    4 drag and drop the redirection page to where you want the TOC.

    Note: A value of 0 (zero) is the duration time (none) and this topic will be displayed before the redirection to the topic target. If you prefer to make this available to the viewer redirection, you can increase it to, say, 8 or 10 and provide a text like "pick up this section of the"Configuration"section. Please wait a moment. »

    Good luck
    Leon

Maybe you are looking for