Difficulty with random bingo card generator

Hi! I'm trying to generate a random bingo card in Flash using
ActionScript. The psudeo-code is pretty sound, I think, but I can't
even get the first number onto the card. I'm trying a random number
variant with output to a dynamic text field. No success. (Simply no
output at all when I run the code...) Thanks!
Here's the code...
// bingoCard.fla
// Jessica S. Hope
// November 6, 2007
// Generate a dynamic ("random") bingo card
stop();
init();
// choose an integer between 1 and 15 for column B
function init (){
number = Math.ceil(Math.random() * 15);
// output to bRow1
bRow1 = number;
} // end init
// REPEAT 4 TIMES TOTAL:
// choose an integer between 1 and 15 for column B
//is it a repeat? if yes, choose again; if no, print output
// choose five integers between 15 and 30 for column I
// choose five integers between 31 and 45 for column N
// choose five integers between 46 and 60 for column G
// choose five integers between 61 and 75 for column O

use trace(); as much as you can to test your code.
If it traces, you know its the instance of your textField,
and less your code.
also, wen placing text on a textfield, it seems more common
to say
textFieldInstanceName.text = randomNumber

Similar Messages

  • K450e difficulty with new graphics card

    Hello Just got a K450e. I upgraded the PSU to a CX750 without any problem. I did this in anticipation of upgrading the video card. I bought an XFX double dissipation R9 280. It fits well in the case. I cannot get this card to work. I have tried everything I can think of. I change the boot settings to PEG (PCI-E) only. I have tried disabling secure boot. I try legacy settings for CSM (despite the card being UEFI compatible). I've tried HDMI and mDP connectors. No matter what I do, I get no output. I cannot find a jumper on the MB to disable onboard graphics. Not sure if that would work anyway. I know there is power to the card. The fans run at slow speed. Any advice on what to try? I've scoured forums and tried everything listed. Nothing has worked.

    Hey lordnkv, Does the system still boot and give display output from the on-board graphics ports? It should switch automatically to display through the graphics card if it's bee installed properly and has enough power. The R9 280 you bought probably has 1 or 2 6-pin power inputs as well, did those get connected?  The fans may still run even if powered only from the PCI-E port it's plugged into, but if not fully powered there will likely be no display output. You shouldn't need to tweak anything in the BIOS to get the card to work properly. If you have any spare cards to try and they work, you may have a defective/DOA graphics card. Sorry you're having difficulty.

  • I'm having some difficulty with Time Machine.  It appears to be deleting backups from random dates on my external hard drive.  I am not deleting them.  Are they hidden and how do I prevent this from happening?  Can I retrieve them?

    I'm having some difficulty with Time Machine.  It appears to be deleting backups from random dates on my external hard drive.  I am not deleting them.  Are they hidden and how do I prevent this from happening?  Can I retrieve them?

    ... I didn't know that Time Machine was more a last resort back up instead of main back up.
    Don't rely upon Time Machine to the exclusion of all else. I compliment Time Machine with a periodic "clone". TM is much better than nothing, but it's a safety net, not a hammock
    Here is my understanding of Time Machine's file deletion algorithm, distilled from Pondini's FAQ, Apple's KB articles, and my own observations.
    Time Machine deletes ("thins") files from the backup disk as follows:
    Hourly backups over 24 hours old, except the first backup of the day
    Daily backups over 30 days old, except the first backup of the week
    Older backups get deleted when Time Machine requires space and you deleted them from the source disk.
    Therefore, assuming TM has been performing at least one backup per day, backup files will remain available:
    at least thirty days, if they existed on your Mac for at least a day
    until you run out of space, if they existed on your Mac for at least a week
    In addition to the above, Time Machine always keeps one complete copy of your source disk so that the entire volume could be restored if necessary. Any files that remain on your source volume will be present on the TM backup, no matter how old they are.
    If you are using 250 GB of space on your source disk, its Time Machine backups are likely to require at least twice that much. A good estimate of the minimum required backup volume size would be about three times the size of your source disk - 1.5 TB in your case.
    A more thorough explanation would require Pondini since he has plumbed Time Machine's mysteries far more than I have.
    http://support.apple.com/kb/HT1427

  • I need to create a bingo card...

    Hi I am totally clueless and started my class well behind everybody else. I am not asking for solution to my assignment is the assignment is to create the whole game, all I am asking is how to start. I am supposed to start by creating a Bingo Card. We were given some codes already, like Arraybag, BagADT etc. using General <T>. Could somone please help me get started?
    I am trying to create a bingocard class. I am supposed to use the Arraybag.
    // ArrayBag.java Author: Lewis/Chase
    // Represents an array implementation of a bag.
    import java.util.*;
    public class ArrayBag<T> implements BagADT<T>
    private static Random rand = new Random();
    private final int DEFAULT_CAPACITY = 100;
    private final int NOT_FOUND = -1;
    private int count; // the current number of elements in the bag
    private T[] contents;
    // Creates an empty bag using the default capacity.
    public ArrayBag()
    count = 0;
    contents = (T[])(new Object[DEFAULT_CAPACITY]);
    // Creates an empty bag using the specified capacity.
    public ArrayBag (int initialCapacity)
    count = 0;
    contents = (T[])(new Object[initialCapacity]);
    // Adds the specified element to the bag.
    // Expands the capacity of the bag array if necessary.
    public void add (T element)
    if (size() == contents.length)
    expandCapacity();
    contents[count] = element;
    count++;
    // Adds the contents of the parameter to this bag.
    public void addAll (BagADT<T> bag)
    Iterator<T> scan = bag.iterator();
    while (scan.hasNext())
    add (scan.next());
    // Removes a random element from the set and returns it. Throws
    // an EmptySetException if the set is empty.
    public T removeRandom() throws EmptyBagException
    if (isEmpty())
    throw new EmptyBagException();
    int choice = rand.nextInt(count);
    T result = contents[choice];
    contents[choice] = contents[count-1]; // fill the gap
    contents[count-1] = null;
    count--;
    return result;
    // Removes one occurrence of the specified element from the bag
    // and returns it.Throws an EmptyBagException if the bag is empty
    // and a NoSuchElementException if the target is not in the bag.
    public T remove (T target) throws EmptyBagException,
    NoSuchElementException
    int search = NOT_FOUND;
    if (isEmpty())
    throw new EmptyBagException();
    for (int index=0; index < count && search == NOT_FOUND; index++)
    if (contents[index].equals(target))
    search = index;
    if (search == NOT_FOUND)
    throw new NoSuchElementException();
    T result = contents[search];
    contents[search] = contents[count-1];
    contents[count-1] = null;
    count--;
    return result;
    // Returns a new bag that is the union of this bag and the
    // parameter.
    public BagADT<T> union (BagADT<T> bag)
    ArrayBag<T> both = new ArrayBag<T>();
    for (int index = 0; index < count; index++)
    both.add (contents[index]);
    Iterator<T> scan = bag.iterator();
    while (scan.hasNext())
    both.add (scan.next());
    return both;
    // Returns true if this bag contains the specified target
    // element.
    public boolean contains (T target)
    int search = NOT_FOUND;
    for (int index=0; index < count && search == NOT_FOUND; index++)
    if (contents[index].equals(target))
    search = index;
    return (search != NOT_FOUND);
    // Returns true if this bag contains exactly the same elements
    // as the parameter.
    public boolean equals (BagADT<T> bag)
    boolean result = false;
    ArrayBag<T> temp1 = new ArrayBag<T>();
    ArrayBag<T> temp2 = new ArrayBag<T>();
    T obj;
    if (size() == bag.size())
    temp1.addAll(this);
    temp2.addAll(bag);
    Iterator<T> scan = bag.iterator();
    while (scan.hasNext())
    obj = scan.next();
    if (temp1.contains(obj))
    temp1.remove(obj);
    temp2.remove(obj);
    result = (temp1.isEmpty() && temp2.isEmpty());
    return result;
    // Returns true if this bag is empty and false otherwise.
    public boolean isEmpty()
    return (count == 0);
    // Returns the number of elements currently in this bag.
    public int size()
    return count;
    // Returns an iterator for the elements currently in this bag.
    public Iterator<T> iterator()
    return new ArrayIterator<T> (contents, count);
    // Returns a string representation of this bag.
    public String toString()
    String result = "";
    for (int index=0; index < count; index++)
    result = result + contents[index].toString() + "\n";
    return result;
    // Creates a new array to store the contents of the bag with
    // twice the capacity of the old one.
    private void expandCapacity()
    T[] larger = (T[])(new Object[contents.length*2]);
    for (int index=0; index < contents.length; index++)
    larger[index] = contents[index];
    contents = larger;
    ======================================================
    I started my class like this:
    * BingoCard.java
    * Created on January 28, 2006, 9:08 PM
    * To change this template, choose Tools | Options and locate the template under
    * the Source Creation and Management node. Right-click the template and choose
    * Open. You can then make changes to the template in the Source Editor.
    public class BingoCard {
    /** Creates a new instance of BingoCard */
    public BingoCard() {
    public static void main (String[] args)
    ArrayBag<BingoCard> bingoBag = new ArrayBag<BingoCard>();
    BingoCard Card;
    What can I do or am I doing wrong? Please help me learn.

    Hey thanks for all the help. I got figured out so thanks again. :D

  • ¿How to fill an array with random letters?

    Hello, I was wondering If filling a bidimensional array
    (8x10 for example) with random letters could be done in C#, I've tried tons of stuff, but I can't manage to do it. Thanks in advance.

    I was wondering If filling a bidimensional array
    (8x10 for example) with random letters could be done in C#, I've tried tons of stuff, but I can't manage to do it.
    >I was wondering If filling a bidimensional array (8x10 for example) with random letters
    >could be done in C#,
    Yes.
    >I've tried tons of stuff, but I can't manage to do it.
    With exactly which part of this assignment are you having trouble?
    Can you create a 2-dim array of characters?
    Can you generate a random letter?
    Show the code you have written so far.
    Don't expect others to write a complete solution for you.
    Don't expect others to guess as to which part you're having difficulty with.
    Show the code you have working, and the code which you have tried which isn't working,
    Explain what is happening with it which shouldn't.
     - Wayne

  • Commutatio​n with 6280 DAQ Card

    Hello,
    I want to perform parameter identification of a three phase brushless DC servo motor. Basically I want to obtain mass moment of inertia, viscous damping coefficient and coulomb friction at the bearing. To do so, I plan to apply a step voltage input to the motor terminals and collect the position information with a DAQ card. I know the inductance and resistance values of the motor windings as well as the I want to perform parameter identification of a three phase brushless DC servo motor.
    Basically I want to obtain mass moment of inertia, viscous damping coefficient and coulomb friction at the bearing.
    To do so, I plan to apply a step voltage input to the motor terminals and collect the position information with a DAQ card.
    I know the inductance and resistance values of the motor windings as well as the torque constant of the motor.
    So when I apply a step voltage input to the terminals of the motor, I would know the torque that is applied.
    And since I know the torque that is applied and also collect the position data I would be able to plot torque vs. position curve and would be able to obtain the necessary parameters from this graph.
    My problem is; I don't know how i can apply a step voltage input to a three phase brushless DC motor.
    Is it possible to use a DAQ card (I have a PCI 6280 DAQ card) for commutation? If it's possible is there an example about commutation of brushless dc motor?
    I don't want to use a motion control card to perform the commutation since I want to observe the motor dynamics only.
    Regards.

    Hello,
    for commutation you need to synchronize the output signals to the absolute rotational position of your motor. Typically this is done by implementing a lookup table to output values according to the motor's angle of rotation. This operation requires deterministic real-time behavior, so you could use a DAQ board with LabVIEW Real-Time, but for your application an FPGA-based R-Series device is probably a much better choice.
    Instead of generating analog output signals, with an R-Series device you could directly generate PWM signals with sinusoidal duty cycles to control an external FET amplifier.
    Here you can find example code for such a setup.
    I hope this helps.
    Kind regards,
    Jochen Klier
    National Instruments

  • Imported files are coming with random pixelated bits?

    The original video files (mp4) are fine when I open them in QuickTime, but when I import them to Final Cut Pro X, they come with random bits that become awfully pixelated or messed up (usually 15-20 frames at a time). Here is a screenshot of the damaged import.
    It happens to both the Optimized and Proxy file, though like I said the original is fine when opened in another program. I've had this problem for a while now, so both Final Cut and my computer have been restarted multiple times. What can I possibly do to import the files cleanly?

    I don't think that would help. I just imported another file straight off my computer (a previously rendered video from Final Cut, so this was never a file actually on the camera card). Again, the file looks pristine in QuickTime, but has random spasms of pixelated mess when I import it to Final Cut.
    Could this be a bug in Final Cut itself and I should reinstall or are there other options?

  • Ok, so I have a 1g macbook Pro and I'm having an issue with the graphics card, so I believe.

         I believe I'm having an issue with the graphics card. For one, when I'm using programs like iMovie '11, SPORE, or the Sims 3  for long periods (hours usualy) of time, the computer will be perfectly fine. It gets warmish-hot, like usuall, all of a sudden it will randomly freeze for 5 to 10 seconds, then shut down and reststart. This happens, espically on the Sims 3 I can play for a while, but when I try to save it will shut down on me.
         Also, I got a new iPod touch 4g on the 25th, the first few times I tried syncing and downloading, it started off fine, but after 10 min. it would restart. Now it works ok, but I still monitor it just incase.
         Can anyone help me understand why all of this is happening? I beleve the graphics card isn't good enough, even though it meets the standards for iLife, and The Sims 3. My graphics card is a ATI,RadeonX1600. The laptop has 2 GB RAM runs at 2.16GHz with an Intel Core Duo on OS X Snow Lepard (10.6.8). Thanks everyone.

    Threads are just processes that link together like the threads in these discussions, well, maybe that is a bad example given how disjointed these get
    It looks like you are not pushing the cpu or hard drive enough to cause your behavior.  Not sure what the temperature limit on that cpu is, on the newer models it is around 100-110 °C which is notciabley hot, and the system shutsdown for self protection at the thermal limit.
    You could be hitting a thermal limit causing that behavior...so do you see good behavior at lower load levela on the system?  Does this only happen with when you are under the high graphic loads?
    Trying to zero in on when this occurs to see if we an isolate the problem.

  • Random Letter & Number Generator

    Hello:
    I'm new to programming (FormCalc & JavaScript) and I'm using Adobe LiveCycle Designer ES 8.2 to create a dynamic form to post online.  I need help with creating a "random letter & number generator" in code.  The purpose is when someone opens the form online; I will create a unique number/letter combo on the form.
    Any help or direction would be much appreciated.  Thanks!

    Hi,
    I believe you are in the wrong forum. This is a forum for Adobe
    LiveCycle Collaboration Service (LCCS) , a real-time social
    collaboration platform.
    You need to visit other forums under LiveCycle
      http://forums.adobe.com/community/livecycle/livecycle_es?view=discussions
    Primarily you can look for LiveCycle Forms sub forum.
    Hope this helps
    Thanks
    Hironmay Basu

  • How do I activate a used iPhone 3 with no SIM card for use as an ipod touch?

    How do I activate a used iPhone 3G with no SIM card for use like an iPod Touch? It was apparently on AT&T previously and I have another iPhone 3 that is active on AT&T if that is helpful. Thanks!

    Copied from the link provided.
    Follow these steps to use your iPhone without a wireless service plan:
    Insert the SIM card from your new, activated iPhone or one that was previously used to activate the original iPhone.
    Connect the iPhone to iTunes on a computer connected to the Internet.
    Once iTunes activates the device, you're free to use the iPhone as if it were an iPod touch.

  • Dear sir I bought my iPhone 4 from Apple store in Charlotte N/C about 2years ago without contract. Now I tried to upgrade it to iOS 7.0.4.but after that my phone not work with last sim card. And invalid sim appeared.so I bought it without contract but it

    Dear sir
    I bought my iPhone 4 from Apple store in Charlotte N/C about 2years ago without contract.
    Now I tried to upgrade it to iOS 7.0.4.but after that my phone not work with last sim card.
    And invalid sim appeared.so I bought it without contract but it seems to be lock in my country
    Please tell me whats the matter?
    My phone serial no  86034HTCA4T
    Modem firmware  04.12.09
    Thanks

    Without contract is not the same as unlocked. The update to iOS 7 relocked
    the iPhone to the wireless carrier to which it was originally locked. You must
    contact that wireless carrier to see if they offer unlocking and if you qualify.
    If you used jailbreak or other hack to unlock the iPhone initially, the method
    used may prevent a legitimate unlock from succeeding and may render your
    iPhone unuseable.

  • I bought this iPhone from Apple Retail Store for the full amount, but  it does not work with my SIM card only works with AT&T

    Hello,
    I have an iPhone 4S 32Gb White AT&T, product part No. MC921LL/A, Serial No. C39GMLPWDTDC
    I bought this iPhone from Apple Retail Store (from Fifth Avenue, NY) for the full amount. Now it does not work with my SIM card only works with AT&T. I restored the phone several times, but I have not received "Congratulations your iPhone has been unlocked". Please activate my iPhone to work with different SIM cards
    Thanks,
    Best Wishes

    When did you buy it?
    Apple did not begin selling an unlocked version of the iPhone 4S in the US until 11/11/11. I believe it went on sale only through the online store at that time. I'm not sure if it's available at retail yet.
    What you purchased was a phone without a contract commitment. It is still locked to AT&T. AT&T will NOT unlock iPhones for any reason.  Return it and get your money back, then use that to purchase an unlocked phone.

  • HT4059 How do I make ibook purchase with iTunes gift card rather than credit card on account.

    How do I make ibook purchase with iTunes gift card rather than credit card on account.

    go to settings- itunes app store- click appleid and view account - may need password - then under billing info select none.  however it will auto use the gift card regardless first

  • Help with Airport Extream Card in PowerMac G5

    Hello,
    I have purchased a used Power Mac G5 with the following hardware:
    Model Name: Power Mac G5
    Model Identifier: PowerMac7,3
    Processor Name: PowerPC G5 (3.0)
    Processor Speed: 2.5 GHz
    Number Of CPUs: 2
    L2 Cache (per CPU): 512 KB
    Memory: 2.5 GB
    Bus Speed: 1.25 GHz
    Boot ROM Version: 5.1.8f7
    While it works perfectly, the machine didn't come with an airport card which I installed:
    Wireless Card Type: AirPort Extreme (0x14E4, 0x4E)
    Wireless Card Locale: USA
    Wireless Card Firmware Version: Broadcom BCM43xx 1.0 (4.170.25.8)
    The machine appears to recognize the airport card and I can "see" my home network but can not connect to it. When I enter the WEP password, it just fails to connect. I have 2 other macs in the house (and an iPhone) along with an HP windows laptop that connect to this network without issue, so I am confused.
    I think there are (at least) 2 variables that I am unsure of:
    One: Do I have the right airport card? As best I can tell, I do. But if anyone can tell from the hardware info I copied above, I'd welcome any info. I did see some posts about "late model dual core" G5s (labeled as model 10,x in system profiler) that needed a different card. I took the airport extreme card from one of my other macs (G4 Mirror Door) and the card works perfectly in that machine. I THINK it's the right card for the G5, but can't be sure.
    Two: Do I have to install any software to configure the card on the computer.
    What else should I be looking for?
    Many thanks,
    Steve

    Hi-
    The Airport Extreme card for the MDD FW800 model is the same as in the G5 up to Early 2005.
    http://support.apple.com/kb/HT3024?viewlocale=en_US
    Did you connect the antenna to the card correctly?
    http://manuals.info.apple.com/enUS/AirPortCard.pdf
    Did you connect the external antenna (T shaped, plug in rear of tower)?
    http://support.apple.com/kb/TA27092
    After proper installation, it should just be a matter of making adjustments to your network settings.

  • HT1918 I can't seem to update my apps or make any purchases on from my account. Nothing has changed with my credit card information and for some reason the iTunes Store tells me my information is incorrect. What do I do?

    I can't seem to update my apps or make any purchases on from my account. Nothing has changed with my credit card information and for some reason the iTunes Store tells me my information is incorrect. What do I do?

    Yes, it's frustrating.
    I don't have my iPod with me but, as I recall, the change is done in Settings/Store.  That change will apply to NEW purchases.  However, be aware that all purchases are permanently associated with the Apple ID that was originally used.  Generally, it's only a problem when you need to update an app.  IF you do your updating from iTunes and your logged in to the "wrong" ID, you'll need to log out and back in again.  It's easier from the iPod as you do not need to log out/in but you do need to know the password.
    Unfortunately, you can not merge IDs nor can you transfer purchases from one ID to another.  Go here to find out exactly what you have.  I have the same problem so I deliberately made both passwords identical to make things slightly easier for me.

Maybe you are looking for

  • HT5271 Adobe flash 11.2 install but Safari 5.1.7 not loading pages

    I'm very frustrated after spending an hour looking into why, once installing updates, Sarfari no longer loads pages.  I have the most current version of Adobe Flash, so that should not be an issue. 

  • Need to remove scrollbars that appear around downlevel poster image in IE

    I have a responsive animation, so I have not played around with height and width dimensions.  Both are set to 100%/auto.  Overflow hidden or visible doesn't make a difference.  Perhaps a '"scrollbars="no"' declaration somewhere, just don't know exact

  • Invoice Verification for Conditions, e.g. Freight Delivery Cost

    PO was created with conditions, i.e. freight. Example:  100 items & 2 USD = 200 USD (Main Product) + Freight                                     50 Total Cost                                  250 Goods are receipted as follows: 1) Main Product 10 ite

  • Thousands of duplicates

    Please help! I have just had to format and reload my PC due to some scrote phishing and putting spyware on it. I have my music library backed up so all music is OK. I connected my iPod and now I hve 3000 plus duplicates. This means that my library wi

  • Activation Inspection Type of Material through BDC

    Dear Experts, Can anyone tell me how to activate the inspection type of material by using bdc or is there any sample program to do so. I have written the program for uploading inspection type for material using bdc. But when i upload the data by defa