Make the button load words from the list

Hey guys!


Just a note, I don't know about programming and I am new to Flash so please tell you the possible answers in the most simple way, thanks!

So I do an application that when you click a button, it will be to randomly select a who, what, when, where and why from a list that I do.

So say there's a button that says new idea.

When I click the button it is:

Who:

Who:

When:

Where:

Why:

Say a small list of who's 1, 2 and 3

A small list of what is 4, 5 and 6

A small list of when is 7, 8 and 9

A small list hence is 10, 11, 12

And a small list of og is why the 13, 14 and 15

How can I do so when I click on the new button idea it (by chance), will select one who, what, when, where and why of their list?

Please help tell me what to do to make the button do place a word in a list, to what I'm asking!

Please, I beg you!

Thank you!!!

To make a random selection from a list, you must first have the list.  A table is a good list, so for each category, create a table and fill each with any choice you intend.

For the an elements to choose randomly from the list, you can use mathematical methods taken Actionscript supported by.

var whoList: Array = [1,2,3];

var randomWho = whoList [Math.floor (Math.random () * whoList.length)];

Please do not start new assignments for the same topic

Tags: Adobe Animate

Similar Questions

  • Script to make the list of layer names.

    I wonder if someone could help me make the simple script that take the layer names and the list of their share on the A4 in canvas.

    Now I just got the screenshot of the list of Illustrator and edit it through photoshop to print, but it is too small, because each file have a approximately 25-50 layers.

    Looks like this:

    layer-list.jpg

    I tried to edit the script of John Wundes, which makes the list of the nuances, but it seems difficult for my skills.

    /////////////////////////////////////////////////////////////////
    // Render Swatch Legend v1.1 -- CS, CS2, CS3, CS4, CS5
    //>=--------------------------------------
    //
    //  This script will generate a legend of rectangles for every swatch in the main swatches palette.
    //  You can configure spacing and value display by configuring the variables at the top
    //  of the script. 
    //   update: v1.1 now tests color brightness and renders a white label if the color is dark.
    //>=--------------------------------------
    // JS code (c) copyright: John Wundes ( [email protected] ) www.wundes.com
    // copyright full text here:  http://www.wundes.com/js4ai/copyright.txt
    //
    ////////////////////////////////////////////////////////////////// 
        doc = activeDocument,
        swatches = doc.swatches,
        cols = 4,
        displayAs = "CMYKColor",  //or "RGBColor"
        rectRef=null,
        textRectRef=null,
        textRef=null,
        rgbColor=null,
        w=150;
        h=100,
        h_pad = 10,
        v_pad = 10,
        t_h_pad = 10,
        t_v_pad = 10,
        x=null,
        y=null,
        black = new GrayColor(),
        white = new GrayColor()
        ;
    
    
        black.gray = 100;
        white.gray = 0;
    
    
    activeDocument.layers[0].locked= false;
    var newGroup = doc.groupItems.add();
    newGroup.name = "NewGroup";
    newGroup.move( doc, ElementPlacement.PLACEATBEGINNING );
    
    
    for(var c=0,len=swatches.length;c<len;c++)
    {
            var swatchGroup = doc.groupItems.add();
            swatchGroup.name = swatches[c].name;
           
            x= (w+h_pad)*(c% cols);
            y=(h+v_pad)*(Math.floor((c+.01)/cols))*-1 ;
            rectRef = doc.pathItems.rectangle(y,x, w,h);
            rgbColor = swatches[c].color;
            rectRef.fillColor = rgbColor;
            textRectRef =  doc.pathItems.rectangle(y- t_v_pad,x+ t_h_pad, w-(2*t_h_pad),h-(2*t_v_pad));
            textRef = doc.textFrames.areaText(textRectRef);
            textRef.contents = swatches[c].name+ "\r" + getColorValues(swatches[c].color) ;
            textRef.textRange.fillColor = is_dark(swatches[c].color)? white : black;
            //
            rectRef.move( swatchGroup, ElementPlacement.PLACEATBEGINNING );     
            textRef.move( swatchGroup, ElementPlacement.PLACEATBEGINNING );
            swatchGroup.move( newGroup, ElementPlacement.PLACEATEND );
    }
    
    
    function getColorValues(color)
    {
            if(color.typename)
            {
                switch(color.typename)
                {
                    case "CMYKColor":
                        if(displayAs == "CMYKColor"){
                            return ([Math.floor(color.cyan),Math.floor(color.magenta),Math.floor(color.yellow),Math.floor(color.black)]);}
                        else
                        {
                            color.typename="RGBColor";
                            return  [Math.floor(color.red),Math.floor(color.green),Math.floor(color.blue)] ;
                           
                        }
                    case "RGBColor":
                       
                       if(displayAs == "CMYKColor"){
                            return rgb2cmyk(Math.floor(color.red),Math.floor(color.green),Math.floor(color.blue));
                       }else
                        {
                            return  [Math.floor(color.red),Math.floor(color.green),Math.floor(color.blue)] ;
                        }
                    case "GrayColor":
                        if(displayAs == "CMYKColor"){
                            return rgb2cmyk(Math.floor(color.gray),Math.floor(color.gray),Math.floor(color.gray));
                        }else{
                            return [Math.floor(color.gray),Math.floor(color.gray),Math.floor(color.gray)];
                        }
                    case "SpotColor":
                        return getColorValues(color.spot.color);
                }    
            }
        return "Non Standard Color Type";
    }
    function rgb2cmyk (r,g,b) {
     var computedC = 0;
     var computedM = 0;
     var computedY = 0;
     var computedK = 0;
    
    
     //remove spaces from input RGB values, convert to int
     var r = parseInt( (''+r).replace(/\s/g,''),10 ); 
     var g = parseInt( (''+g).replace(/\s/g,''),10 ); 
     var b = parseInt( (''+b).replace(/\s/g,''),10 ); 
    
    
     if ( r==null || g==null || b==null ||
         isNaN(r) || isNaN(g)|| isNaN(b) )
     {
       alert ('Please enter numeric RGB values!');
       return;
     }
     if (r<0 || g<0 || b<0 || r>255 || g>255 || b>255) {
       alert ('RGB values must be in the range 0 to 255.');
       return;
     }
    
    
     // BLACK
     if (r==0 && g==0 && b==0) {
      computedK = 1;
      return [0,0,0,1];
     }
    
    
     computedC = 1 - (r/255);
     computedM = 1 - (g/255);
     computedY = 1 - (b/255);
    
    
     var minCMY = Math.min(computedC,
                  Math.min(computedM,computedY));
     computedC = (computedC - minCMY) / (1 - minCMY) ;
     computedM = (computedM - minCMY) / (1 - minCMY) ;
     computedY = (computedY - minCMY) / (1 - minCMY) ;
     computedK = minCMY;
    
    
     return [Math.floor(computedC*100),Math.floor(computedM*100),Math.floor(computedY*100),Math.floor(computedK*100)];
    }
    
    
    function is_dark(color){
           if(color.typename)
            {
                switch(color.typename)
                {
                    case "CMYKColor":
                        return (color.black>50 || (color.cyan>50 &&  color.magenta>50)) ? true : false;
                    case "RGBColor":
                        return (color.red<100  && color.green<100 ) ? true : false;
                    case "GrayColor":
                        return color.gray > 50 ? true : false;
                    case "SpotColor":
                        return is_dark(color.spot.color);
                    
                    return false;
                }
            }
    }
    

    arop16461101,

    something like that?

    var theLayers = app.activeDocument.layers;
    var str = new Array ();
    for (i = 0; i < theLayers.length; i++) {
        str.push (theLayers[i].name)
        }
    var tF = theLayers[0].textFrames.add();
    tF.contents = str.join ("\r");
    alert("new text frame with layerlist added on layer " + theLayers[0].name);
    

    Have fun

  • Palm m100 error: could not open to make the list of database

    I have an old Palm m100 and never even use your handheld more.  I have the software on my windows XP desktop.  The program worked very well and the other day, I tried to open it and received an error message "Unable to open to make the list of database."

    I did save about 30 days ago, but have since been several dates in the calendar.  I don't really care "do" list, but still failed to open the program.

    I thought to uninstall and then reinstall.  When I go into Add/Remove Programs, I don't see the program of palm - where could I find it?  I also tried to restore to an earlier date of a few days, but that has not worked.  Any other ideas?

    If 'do' database does not open, you can try the following to see if you can open the program.

    Go to program files on drive c. find the Palm folder. In the Palm folder, find your username folder, it will be a similar name to your hotsync username. In the user name folder, find the folder tasks/todo.

    Right-click and rename the folder, set a .old on the file extension. Try and open Palm desktop.

    Palm desktop must be in the Add/Remove Programs list in the control panel and should be included as a Palm or Palmone.

    Click on the following link for the guide of the user for your handheld.

    User Guide (PDF: 2.4 MB / 212 pages)

    The best way to protect your data is to export the data in each category of Palm Desktop in a separate folder on your PC.

    Create a new folder on your PC somewhere that suits. Name it something like Palm Desktop data. Click on the link below and follow the instructions on this page for the export procedure.

    http://www.Palm.com/cgi-bin/cso_kbURL.cgi?id=28734

    Make sure you only select everything for the beach in the export window.

    With the data stored in the created folder, make a copy of this file and save it on a USB key, cd - rw or external hard drive.

    Whenever you change in Palm Desktop, export the data that has been changed in this file and save again to external media.

    With this process you can always import the data in Palm Desktop, whenever you have a problem with the data in Palm Desktop, or if your computer/hard drive/device crash.

  • How to make 'the list' by default for Windows Explorer?

    Details is the option by default whenever I find files or documents in Windows Explorer in Windows 7.  I can change a particular folder for the 'list', but as having the default value for the list and details to be an option.

    If you set this value, it will remember that whenever you return to this file until you change something else.  If you don't want to define for each folder one at a time, you can use my trick to apply both:

  • Feature request: make the list "Ignored method" configurable from the GUI

    When the current generation, please edit Onyx.settings file for Add/Remove methods that should be ignored.

    This function can be made available in the GUI?

    BTW, when the Onyx does not read the file Onyx.settings? Only at startup? Or every time you start a capture?

    ____________

    Blog: LucD notes

    Twitter: lucd22

    Hi LucD,

    Thanks for the suggestion! I agree with you that it will be much more convenient if these settings can be changed in the GUI. I put your suggestion as a feature request in our database, and it will run in a future release.

    And to answer your question - the settings are loaded only at startup. However some of the changes made in the settings dialog box take effect immediately after save you them.

    Kind regards

    Ignat

  • How to make the list of instrumental music

    How to make a list of all my player someone help

    Alan

    iTunes is not a method to determine what tracks have vocals. You can create a normal playlist and put what you want in it.

    TT2

  • Windows Explorer crashes when you try to make the list of associated file types. Error: 0xc0000005

    This is the view in the general tab of the event viewer. Looks like a problem ole32.dll but I don't know what to do. I have Win 7.

    The failing application name: Explorer.EXE, version: 6.1.7600.16450, time stamp: 0x4aeba271

    The failed module name: ole32.dll, version: 6.1.7600.16385, time stamp: 0x4a5bdac7

    Exception code: 0xc0000005

    Offset: 0x0002af88

    ID of the process failed: 0x1bfc

    Start time of application vulnerabilities: 0x01cafc16e3fb0780

    The failing application path: C:\Windows\Explorer.EXE

    The failed module path: C:\Windows\system32\ole32.dll

    Report ID: 605a0c40-680a-11df-b86a-001e90f0c8af

    Thank you

    Brian

    Often, a certain instability in Windows Explorer is due to the defective shell extensions and addons.
    Consider using Sysinternals Autoruns or ShellExView. Disable Add-ons and non Microsoft shell extensions and verify the behavior.  If he went, reactivate the disabled extensions/add-ons, one at a time and see if you can identify who may be liable.
    Try a clean boot, or boot into safe mode.  The behavior persists?
    If you continue to experience the problem, consider creating the hierarchy of following registry keys in the registry:
    HKLM\Software\Microsoft\Windows\Windows error Reporting\LocalDumps\explorer.exe\
    In the explorer.exe key, create a REG_EXPAND_SZ value named DumpFolder and set the value to%systemdrive%\localdumpsdata.  Ensure that the %systemdrive%\localdumps file exists, and then cause the crash to happen.  It must be a dump file in %systemdrive%\localdumps. Download the dump on your SkyDrivefile.
    (Letter is an environment variable that represents the system drive, usually C:.)
  • How to make a button to display in a list only when an investigation is completed?

    I use cf9 with mySQl 5 +. I have two tables:

    1. Registrations - where people register for a course.
    2. Course_eval - once the course is completed, the student fills in the evaluation of courses

    I use an inner join on user name in both tables.

    I have a page, showsignups.cfm, that lists all the students per class. Once a student has completed the survey, a button will appear next to the student in the showsignups.cfm page where it can be clicked to show the investigation by the student.

    My problem is instead to show all students with or without the buttons of the investigation, that it shows that students who have completed the survey. It must show:

    Name of the student. Survey button

    Name of the student.

    Name of the student. Survey button

    Name of the student.

    I thought using a cfloop through students would give me the effect I want, but alas, no. Here is the code that I use for the cfquery:

    "< name cfquery ="getsignups"datasource =" #application.dsn # "" >

    Select signups.courseTitle, signups.property, signups.calendardate, signups.company, signups.firstna me, signups.lastname, signups.email, signups.phone, signups.userID, signups.signup_id, signups.r id, course_eval.userID, course_eval.id

    inscriptions INNER JOIN course_eval ON signups.userID = course_eval.userID

    where signups.rid = #rid #.

    < / cfquery >

    (RID is the courseID)

    Here is what I use:

    < cfoutput >

    "< cfloop query ="getsignups">."

    < b >

    < td > #rid # -#firstname # #lastname # |   < a href = "mailto:#email#" > #email # < /a > <table > < td >Ph: #phone #< table >

    < td width = "24" >< a href = "" showsignups.cfm? signup_id = #signup_id # & go = go "class ="button"> delete < /a > <table > "

    < isdefined ("id") cfif >

    " < td width ="24">< a href ="... /... "/ forms/surveys.cfm? userID = #userID #" class = "button" >survey< /a > <table >

    < / cfif >

    < /tr >

    < / cfloop >

    < / cfoutput >

    I know this is a long post, but I wanted to make sure that any body who reads this includes what I'm trying to accomplish. Any ideas on what I am doing wrong?

    Do not use a join internal:

    Select signups.courseTitle, signups.property, signups.calendardate, signups.com pany, signups.firstname, signups.lastname, signups.email, signups.phone, gnups.userID, signups.signup_id, signups.rid, course_eval.userID, course_e val.id

    of registrations LEFT OUTER JOIN course_eval ON signups.userID = course_eval.userID

    where signups.rid = #rid #.

                 #rid# - #firstname# #lastname#  |   #email#Ph: #phone#      Remove              Survey                          
    

    Use:

    Post edited by: Eddie Lotter (Typo)

  • need to make the chapter button without crashing in again

    why I'm crashing trying to make a button

    [Moved from Premiere Pro in again... MOD]

    You run the Mavericks or Yosemite?

  • How to make a keyboard navigation in the list multiple choice Flash and control it via actionscript?

    I do a style rpg game in actionscript 3.0 and I want to do a list multiple choice. I know how to make the list with the buttons and to fight against it. My question is, how to make a list that can be done using the arrows on the keyboard? What I'm after is to be able to strike up and down to select the buttons and enter to choose the button.

    You'll need to make the macarons also movieclips so that you can control which display state they are in (highlighted or not).

    Then, you need to configure a listener for the keys on the keyboard so that you can have change the selected button and run if you press Enter.  Here's a basic configuration of a keyboard listener that shows how to detect the three keys you mentioned...

    stage.addEventListener (KeyboardEvent.KEY_DOWN, keyIsDown);

    function keyIsDown(e:KeyboardEvent):void {}

    If (e.keyCode == Keyboard.DOWN) {}

    trace ("Down");

    } Else if (e.keyCode == Keyboard.UP) {}

    trace ("up");

    } Else if (e.keyCode == Keyboard.ENTER) {}

    trace ("Enter");

    }

    }

  • I want to make the history drop-down list smaller or narrower

    The history list has grown grew so great that it occupies more than half of my screen. How can make the list view more narrow and smaller. Ten points should not have to take half a 19 inch screen.

    Note that you can also place such a CSS code in the file userChrome.css in chrome file in the Firefox profile folder.

    I use code like this:

    /* urlbar - separator */
    #urlbar .dropmarker-icon, #urlbar toolbarbutton {border-left:1px solid ThreeDShadow !important}
    #urlbar-icons image {border-left:1px solid ThreeDShadow !important}
    
    /* urlbar - border */
    .autocomplete-richlistitem {padding-top:2px!important; padding-bottom:2px!important}
    .autocomplete-richlistitem:not(:first-child) {border-top:1px solid #ddd!important}
    .autocomplete-richlistitem[selected="true"] {border-top-color:transparent!important}
    
    • create the chrome (lowercase) folder in the .default profile folder if the folder does not exist
    • Use a text editor like Notepad to create a userChrome.css (new) file in the folder chrome (file name is case sensitive)
    • Paste the code in the userChrome.css file in the Editor window
    • Make sure the userChrome.css file begins with the default line @namespace
    • Make sure that you select "All files" and not "text files" when you save the file via "save file as" in the text editor as userChrome.css.
      Otherwise, Windows can add a hidden file .txt extension and you end up with one does not not userChrome.css.txt file

    You can use this button to go to the current Firefox profile folder:

  • Container comes now, but the list is not... boo

    -All right, so the container is good to go now, I have this to try to get the built list.

    var cont:Container = new Container();
    cont.margins = Vector.([5,5,5,5]);
    cont.debugColor = 0x33FF33;
    cont.setSize(200, 100);
    
    _individFoods = new Array();
    
    for (var i:int = 0; i < json.foods.length; i++)
        {
        if (json.foods[i].brand == "")
        {
        _individFoods[i] = { label: json.foods[i].name };
        }
        else
        {
    _individFoods[i] = { label: json.foods[i].name + '(' + json.foods[i].brand + ')' };
        }
    }
    
    if (_dropCreated == false)
    {
        _list = new List();
        _list.containment = Containment.BACKGROUND;
        _list.dataProvider = new DataProvider(_individFoods);
        cont.addChild(_list);
        _dropCreated = true;
        addChild(cont);
    }
    

    Anything whatsoever reach senior year as strange?

    Hey,.

    a couple of things stand out - first you don't seem to be of the size of the list. I think that the list component he requires in order to make the list. and the second because you set the size of the front of the container, its best to do a cont.layout () after you are done to add children to the containing element. Good luck!

  • When I press the tab button all my favorites in a show from the list-how to make that happen?

    When I press the tab key to open a new page, all my favorites in a show from the list-how to make that happen? It should be a correct white page or the home page?

    said CWEB

    When I press the tab key to open a new page, all my favorites in a show from the list-how to make that happen? It should be a correct white page or the home page?

    OK this question I figured it adds on the deletion settings

  • Make XP Taskbar buttons loading in order instead of the startup?

    On my old computer running Windows 2 k Pro years there, I was able to configure my startup programs would load their buttons on the taskbar in the order that I preferred.   But who was so long that I forgot for a long time how I managed this thing.

    I am running XP Home Edition on a small portable hand and XP Pro on a second-hand PC.

    I would like to set up two of them, so that the programs that I have configured to run at startup to the top will be displayed on the taskbar next to the Start button in this order (from left to right)

    Departure: Windows Explorer: Web browser: program by e-mail: text editor: the Task Manager

    Can it be configured in XP, or do I have to download a special utility program?

    Will be in Seattle
    alias "Clueless."

    Hello

    Follow the link below.

    Display the Quick Launch toolbar.

    http://Windows.Microsoft.com/en-us/Windows-XP/help/display-Quick-Launch-toolbar

    To customize the Quick Launch toolbar, follow these steps.

    How to add a program to the Quick Launch bar

      To add programs to the Quick Launch bar, follow these steps:

    (a) click Start, point to programs, and then point to the program you want.

    (b) right click on the program and then click create a shortcut.

    (c) click Start, and then point to programs.

    For example: you should see the shortcut in the list with (2) after the name. For example, if you created a shortcut for Microsoft Word, you should see Microsoft Word (2).

    (d) click the shortcut, and then drag it to the quick launch on the taskbar bar.

    (e) repeat these steps for all the icons of programs according to the needs.

    To add to the Windows Explorer, drag my computer in the start menu and drop it on the Quick Launch bar.

    To add the quick launch task manager, follow these steps:

    a. navigate to C:\Windows\System32 and then look for taskmgr.exe

    b. right click on taskmgr.exe, choose sendto , and then click desktop (shortcut).

    c. now drag the desktop shortcut in the quick launch menu.

  • Help make the second image in the slideshow load a button.

    Hello world.

    Can someone help me with the actionscript code to one of my images in a slideshow (whose images are linked externally through actionscript)

    load a button which is accessible only when this specific image is displayed.

    for example-image 1 - No button but image 2 has the button, button 3-no image, image 4, no button... and so more.

    Here is my script for the slideshow and prev buttons and following

    var totalSlides:Number = 6;
    var currentImage:Number = 0;
    var imagePath:String = "images/ad";
    var imageName:String = "announcement";
    var imageExt:String = ".jpg";

    var adImages:MovieClipLoader = new MovieClipLoader();

    function loadSlide() {}
    adImages.loadClip (imagePath + currentImage + imageExt, "adImages_mc");
    }

    loadSlide();

    this.prevSlide_btn.enabled = true;
    this.prevSlide_btn._alpha = 100;

    this.nextSlide_btn.onRelease = function() {}
    _root.prevSlide_btn.enabled = true;
    _root.prevSlide_btn._alpha = 100;


    If (currentImage < (totalSlides - 1)) {}
    currentImage ++;
    loadSlide();
    }

    If (currentImage == (totalSlides - 1)) {}
    _root.nextSlide_btn. Enabled = false;
    _root.nextSlide_btn._alpha = 50
    }
    }

    this.prevSlide_btn.onRelease = function() {}
    _root.nextSlide_btn.enabled = true;
    _root.nextSlide_btn._alpha = 100;

    If (currentImage > 0) {}
    -currentImage;
    loadSlide();
    }

    If (currentImage == 0) {}
    _root.prevSlide_btn. Enabled = false;
    _root.prevSlide_btn._alpha = 50;
    }
    }


    Im a beginner but know some actionscript.

    I really appreciate the help.

    Thanx

    I guess that the button that you want to display is not indicated for anywhere in the code that show you.  What you can do, is make the button visible/invisible in the function loadSlide.  This assumes that currentImage = 1 is the second image, change only if it is actually 2.

    function loadSlide() {}
    adImages.loadClip (imagePath + currentImage + imageExt, "adImages_mc");

    if(currentImage == 1) {}

    certainButton._visible = true;

    } else {}

    certainButton._visible = false;

    }
    }

Maybe you are looking for

  • home user network lead to damaged keychain - still no solution since Mavericks

    Hello! This discussion is a very frustrating bug - who lives in OS X since Mavericks and is still not fixed in El Capitan 10.11.3 even if a lot of bug reports were filed, but Apple does not recognize. The bug in brief: If you try to use the home netw

  • Folio 13: Reset password BIOS - Folio 13 HP

    Reset password BIOS - Folio 13 HPSystem to disable code 70406515

  • HP envy 1060ea

    Hello I have hp envy 15-1060ea laptop with windows 7 Home premium I want to buy the disc ssd for my laptop can someone tell me please make my laptop's sata 3 or not new disk ssd because most come with sata 3, 6 GB speed and I'm looking for 'vertex 3'

  • PERC 6 / I in PowerEdge T610

    Is the maximum size of the disks SAS 2 terabytes and is there a solution to install 4 terabyte drives?

  • Can I install a new windows 7 Home premium and change the language?

    Hello I have a license for windows 7 Edition family premium, it seems that it is not possible to change the language of this one to a new (the Microsoft language packs are not provided for windows 7 Edition home premium) so I'm wondering is - it poss