Help figuring out how to tell if an object is within a dynamically made circle

Hello Everyone,
I am currently in the middle of working on a project but sadly I am having a bit of trouble getting a few things figured out.
Essentially what the project consists of is I have random balls appearing on the screen and moving around and I need to make it so that the user is able to draw a circle around the ball (may be more than one) and have that balls dissapear and count the number of balls circled.
This project is being done in flash builder 4.5 and is being made for the android platform as part of a senior project.
At this point this is where I am.. I have been able to randomly create the balls and give them a random movement. I have also been able to figure out how to allow the user to draw on the screen.
What I am trying to figure out is how to make it so that if the user draws a circle around the balls make it so that I know these balls have been circled and make them dissapear and have the number of balls inside the area calculated.
I have thought about making the entire background a grid and make it so that I can track somehow the line made by the user and then track the coordinate of the balls then if it is within that area it means that the ball has been circled but I would like something more efficient than that.
I apologize if it is unclear for what I am looking for but a simple description is I am making a simple game where you are able to circle a moving item on screen, then once it is circled the item disappearsand you gain a point.
Any help would be greatly appreciated.

that's non-trivial.  just determining if your user drew a closed curve is non-trivial.  then deciding what's inside and what's outside that curve is non-trivial.
that's not to say it can't be done or even, that it can't be done with flash.  it can.  but you're not going to get a short paragraph answer to this one unless there are significant assumptions you can use to simplify the problem.

Similar Messages

  • I am in desperate need of help figuring out how to create intricate cut marks around artwork to be made into stickers in indesign.

    Hi everyone! I am brand new to InDesign, took a beginner's class on it, bought a Mac, ready to dive in. A friend of mine offered me an amazing opportunity to be the "middle man" for her sticker/magnet distributing business. She already has the artists and she does the printing and distributing (obviously) my job will be to create the cut marks around the artwork to designate where the printer blade should cut.....I have tried googling and you tubing, but my terminology is clearly severely lacking. ANY SORT OF ADVICE WOULD BE GREAT!!! Thank you so much

    Here's a method for creating a contour line in ID that might work in many situations to create the die line you'll need:
    Place the art, then copy and "paste in place" so you have two stacked images.
    For this type of art it's pretty likely that there is a strong edge contrast, even a transparent background, so there's a good chance you can make a decent clipping path. Select the top copy, go to Object > Clipping Path > Options... and set it to detect edges (turn on the preview). Play with the tolerance and threshold sliders (lower numbers are likely to work better) until you get a path that matches the shape to your satisfaction, and set an Inset Frame value if you want to chop off part of the art (not likely) or enter a negative value for moving the line away from the art (very likely). When you're happy, click OK.
    Object > Clipping Path > Convert Clipping Path to Frame, then double click on the art inside the newly shaped frame to select the content (or use the direct select tool) and delete it, leaving the frame and the other art behind it intact. Apply a stroke to the contoured frame, colored with a spot color assigned to die lines (die lines are always a spot color so they are on their own plate all alone), and set the stroke to overprint.
    Group with the art and you're done.

  • IPhone 5S IOS 8. Can't figure out how to disable the "live" location feature within the native calendar app used for mapping/travel time.  Have looked everywhere and it's driving me nuts.  Thanks for any help on where to make the change!!

    iPhone 5S IOS 8. Can't figure out how to disable the "live" location feature within the native calendar app used for mapping/travel time etc.  Have looked everywhere and it's driving me nuts.  Thanks for any help on where to make the change!!

    iPhone 5S IOS 8. Can't figure out how to disable the "live" location feature within the native calendar app used for mapping/travel time etc.  Have looked everywhere and it's driving me nuts.  Thanks for any help on where to make the change!!

  • I have a mac 10.5 and need help figuring out how to change my email settings so it does not automatically delete my inbox every 30 days.  How to I adjust the mail settings?

    I have a mac 10.5 and need help figuring out how to change my email settings so it does not automatically delete my inbox every 30 days.  How to I adjust the mail settings?

    I think it must be an IMAP account then, & in Mail>Preferences>Accounts>Advanced>Keep copies for Offline viewing:>Don't keep copies, then on the Server, or maybe it's just this one itself, but on the Server you have a setting to remove eMails after 30 days.
    If it's a POP account we'd have to investigate that... but you didn't say so I'm guessing here.

  • How do I get my previous contacts from mobileme now to the icloud? I need help figuring out how to make that transition?

    How do I get my previous contacts from mobileme now to the icloud? I need help figuring out how to make that transition?

    Try using the app My Contacts Backup, which will back up your contacts as an attachment to an email.  Send this email to yourself, open it on your Mac and double-click the attachment to import them to Address Book (or Contacts if you have Mountain Lion).

  • Need Help Figuring Out How to Access On/Off Field in Upper Left Hand Corner

    I am hoping someone can help as I am not at all TECHNICALLY SAVVY!!  I must have hit some wrong button yestyerday because now I cannot get access to my messages on my Blackberry Curve.  I think it may be because the word OFF appears at the top of the screen on my Blackberry on the far left hand side and I cannot figure out how to access that part of the screen to change it to say ON.

    Well, give it a few minutes, and if after 15 minutes no new email messages, Do a simple reboot on the BlackBerry in this manner: With the BlackBerry device POWERED ON, remove the battery for a minute, and then reinsert the battery to reboot. A reboot in this manner is prescribed for most glitches and operating system errors, and you will lose no data on the device doing this.
    Meanwhile, if you've read or deleted any of the email sent in the interim from your PC, you won't be getting it on your BlackBerry.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Need Help figuring out how to alphabetize itunes artist.

    I need help figuring out one more thing. I have my artist tab in my itunes library and I need to figure out how to get all the artists grouped together instead of being scattered all around.
    This is how it looks now:
    Justin Timberlake
    Linkin Park
    Linkin Park
    Linkin Park
    Justin Bieber
    Daughtry
    Linkin Park
    Linkin Park
    JoJo
    Linkin Park
    This is how I want it to look:
    Daughtry
    Justin Timberlake
    Justin Bieber
    JoJo
    Linkin Park
    Linkin Park
    Linkin Park
    Linkin Park
    Linkin Park
    Please help! Thanks!

    Enable the Sort Artist, Album Artist and Sort Album Artist columns so you can see what is going on. Album Artist normally takes precedence over Artist, with the Sort fields further controlling the order.
    See also Grouping tracks into albums.
    tt2

  • I need help figuring out how to Link Data from one table in Sharepoint to another table in Sharepoint and make it dynamic

    Hi Everyone,
    I am working on a project that uses SharePoint 2010 for repository and we have multiple tables that we are using.
    One table is a list of the various projects we are working on (workstreams)
    The other is a table with various notes and such, to include meeting notes for the various projects.
    Currently we are just copying the shortcut from the meeting notes table and adding it in as a link in the workstreams status table.
    I need to find out if there is some sort of way to make this process dynamic so that when a new note is added for, lets say workstream #1 in the notes table, it will automatically propogate into the notes link section for workstream #1.
    Is this even possible??
    And if so how would I do it
    I haven't done much with modifying SharePoint in several years, and would Truly appreciate any and all help with this.
    Thanks in advance
    IKE

    Hi IKE,
    According to your description, my understanding is that you want to create a link in the workstreams list linked to the associated item of the notes list.
    Assuming the workstreams list has  Title column and another column called “Note” used to linked to notes list, and the notes list has Title column and another column used to store note.
    Then you can create a workflow on the notes list with SharePoint Designer 2010, and in the workflow, using “Update ListItem” action. And in the workflow Start Options, select “Start workflow automatically when an item is created”.
    For the workflow action, you can set as the screenshot:
    For the string in the String Builder, you need to open an item of notes list, then copy the URL of the display form and paste here, the URL will look something like this:
    http://sp/Lists/notes/DispForm.aspx?ID=1&Source=http%3A%2F%2Fsp%2FLists%2Fnotes%2FAllItems%2Easpx&ContentTypeId=0x0100300025278693CE49A5E3A394B23AD9E1&IsDlg=1
    Now, you need to replace the ID of the item using [%Current Item:ID%], for example in the above link, delete the number 1 and add [%Current Item:ID%].
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • I need to figure out how to tell Organizer that photos have moved from one hard drive to another

    I have PSE 10 on my laptop and used Organizer to tag and view images on my laptop and on my PC via a wireless network.  My PC died but I had all the photos backed up on an external hard drive.  I want to tell Organizer to look for those photos (hundreds of them) on my external hard drive instead of trying to find them on the PC drive.  Any idea how to do this?

    If you have recovered your catalog folder, which was probably on your C: drive, you can try to reconnect:
    http://kb2.adobe.com/cps/333/333358.html
    However, you have probably lost your catalog, so your only solution is to import your files again in a new empty catalog. If you had 'written metadata to files', you'll recover tags and ratings, but not albums, stacks or version sets.

  • Need help figuring out how to make all images appear on every page

    Hello,
    I user Dreamweaver MX and created this site for my church
    www.ccosj.com. When I created the site I used image ready for the
    ind. parts of the page. Loading them into dreamweaver and adjusting
    the rollovers there (with some tutorial help since I am not that
    good at it) I get the pages all to look great on my computer but
    when uploading to the site, every page I click on all the images
    reload and therefore the pictures constantly look as if they are
    reloading. What am I doing wrong? should I take the preload script
    out? Why does it look good on my computer but not on the site? Any
    help would be appreciated but please know I am a novice at this.
    Bernadette

    Update it using iTunes on your computer instead of trying to do it over the air. The space requirement doesn't apply.
    In addition, when doing so, you can choose download only initially, allowing you to unplug the phone and go about your day while iOS downloads. Then, when it's finished downloading, you can plug it in and update it without having to wait.

  • I need help figuring out how to put pics over video

    How do I put pictures over video while keeping the audio from the video? I am using Premiere Elements 9.

    Do you want the pictures to fill your video frame or do you want them smaller than the video frame so that the video shows behind them?
    Have a look at my sample "Add Motion Behind Your Slideshow" sample and see if that's what you're trying to do.
    http://muvipix.com/cooltricks.php
    In any event, you put the video on one video track and the photos on a track above it, basically.
    There's much more to explain, but before we get too deeply into that, we need to know exactly what you're trying to do. Can you link us to a YouTube video example?

  • My friend just gave me his old ipod touch and I need help figuring out how the put it on my itunes account so that I can add songs and apps to it. Does anybody know how?

    Just in case that wasn't specific enough....It's an older ipod touch.  He gave it to me as a Christmas gift and I want to keep the songs and Apps he already has on it but I want to be able to add more to it which means I would need it on my own itunes account because I can't add anything to it without a password.

    I'd suggest restoring it to make sure you start completely clean:
    http://support.apple.com/kb/HT1414
    Then you can sync whatever content you wish:
    http://www.apple.com/support/ipodtouch/
    Regards.

  • Need help figuring out how to deal with inheritence issues

    So I have these two classes, one's called MC, which represents a Multiple-Choice question, and one's called TF, which represents a True/False question. It would make sense to have TF inherit from MC, since TF is simple a MC question with two set options (true and false!).
    So it would also make sense for the constructor for MC to take a prompt (the question itself) and a Vector of Strings for choices, like so:
    MC(String prompt, Vector<String> choices);
    And then the TF constructor would just take a prompt (since the choices are always going to be true and false) and just pass a preset vector to the MC constructor, like so
    TF(String prompt);
    However, here's where the problem lies. Since I can must call my super constructor first, I have no way to initialize my preset Vector of choices (true and false). I could have a seperate MC constructor for handling this, but a parent class should not have to know what a child class needs to do, right? I need a quick and relatively proper solution for this if anyone has one. Thanks in advance!

    private static final List CHOICES = new ArrayList();
    static {
      CHOICES.add("True");
      CHOICES.add("False");
    public TrueFalse(final String question) {
      super(question, CHOICES);
    }For the record, if I were doing this, I'd make an interface called "Question" and have both TrueFalse and MultipleChoice implement it. If there were similar functionality, I'd put it in an abstract class AbstractQuestion, then have TrueFalse and MultipleChoice extend AbstractQuestion and implement Question.

  • I need help figuring out how to creat a button listener for my panel

    import java.awt.*;
       import java.awt.event.*;
       import javax.swing.*;
       import java.util.Scanner;
        public class ExpressionCalculatorPanel extends JPanel
       // Variables to be used
          private JLabel inputLabel, resultLabel;
          private JTextField ExpressionCalculator;
          private JButton computeButton;
       //  Constructor: Sets up the main GUI components.
           public ExpressionCalculatorPanel()
             inputLabel = new JLabel ("Enter a value of x");
             resultLabel = new JLabel ("Final result = ---");
             ExpressionCalculator = new JTextField (5);
             ExpressionCalculator.addActionListener(new ButtonListener());
               // Set buttons and listeners
             computeButton = new JButton("Compute Final Result");
             computeButton.addActionListener(new ButtonListener());
               // Add to panels
             add (computeButton);
             add (inputLabel);
             add (resultLabel);
             setPreferredSize (new Dimension(300, 75));
             setBackground (Color.white);
       //  Represents an action listener for the temperature input field.
           private class ButtonListener implements ActionListener
          //  Performs the conversion when the enter key is pressed in
          //  the text field.
              public void actionPerformed (ActionEvent event)
       }

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.Scanner;
    public class ExpressionCalculatorPanel extends JPanel
    // Variables to be used
    private JLabel inputLabel, resultLabel;
    private JTextField ExpressionCalculator;
    private JButton computeButton;
    // Constructor: Sets up the main GUI components.
    public ExpressionCalculatorPanel()
    inputLabel = new JLabel ("Enter a value of x");
    resultLabel = new JLabel ("Final result = ---");
    ExpressionCalculator = new JTextField (5);
    ExpressionCalculator.addActionListener(new ButtonListener());
         // Set buttons and listeners
    computeButton = new JButton("Compute Final Result");
    computeButton.addActionListener(new ButtonListener());
         // Add to panels
    add (computeButton);
    add (inputLabel);
    add (resultLabel);
    setPreferredSize (new Dimension(300, 75));
    setBackground (Color.white);
    // Represents an action listener for the temperature input field.
    private class ButtonListener implements ActionListener
    // Performs the conversion when the enter key is pressed in
    // the text field.
    public void actionPerformed (ActionEvent event)
    }

  • I need help figuring out how to use my print screen key

    I have an HP Pavilion Entertainment PC dv7-1245. The key is above the num lock key  - it has "home" which works when I press it but under that it has "prt sc" but I don't know what to hit along with it to make it work. I tried the shift key, the alt key, the fn key and nothing works. I even looked in the manual and those keys above the num lock key are not even referenced.

    to capture active windows the key combo is ctrl+alt+fn+print sc
    Although I am an HP employee, I am speaking for myself and not for HP.
    Make it easier for other people to find solutions, by marking my answer with 'Accept as Solution', if it solves your problem.
    Click on the BLUE KUDOS button on the left to say "Thanks"

Maybe you are looking for