How to make something happen when an object touches another

In my game I'm making (actionscript 3.0), I need the game to gotoAndStop once a circle goes "out of bounds". Is there a syntax or something about on impact or something? Please help I'm a begginer.

that's working, but the problem is I only want it to be triggered when it hits the outline, not the fill. The circle is within a maze. How do I make it so that if part of the circle goes outside the inside area it triggers a gotoAndStop command?

Similar Messages

  • How to make something similar in 3d? (tv graphics, no only compositing topic!))

    Hi, I am aware that this is community for After Effects, and also this example contains some objects probably maded in some 3D programs, but I want to hear opinion form an expert how exampes below are did:
    These are examples from one tv station i Europe:
    I am curious how it is made:
    http://www.youtube.com/watch?v=QBrQ7krzrVw (please watch only begin and the end of this video)
    http://www.youtube.com/watch?v=j9pU_XIJQqA (especially from very end of video clip-cubes)
    I want to know way how to make something similar and how to composite them like this way?
    Any links related to tutorials, links for similar techniques (c4d, max...?)
    What is your opinion about modeling this scene?
    Thank you!

    It will probably take some 3-D modeling.  Bringing it into AE, I will point you to Andrew Kramer's Element 3D plugin - http://www.videocopilot.net/ 
    He has one demo that is doing a very similar effect -- http://www.videocopilot.net/tutorials/element_animation_engine/

  • CS6 Fluid Grids - how to make images resize when page is resized? [was: Hello]

    I am new to fluid grid layouts in Dreamweaver cs6, I want to insert a GIF file on my index page but I do not know how to make it so when the page shrinks the GIF or image shrinks as well. The only code that I have found is
    img, {
        max-width: 100%;
    But this code already exists in the css file when you create a new fluid grid based layout
    img, object, embed, video {
        max-width: 100%;
    can anyone help a newbie please..

    this is my source code
    <!doctype html>
    <!--[if lt IE 7]> <html class="ie6 oldie"> <![endif]-->
    <!--[if IE 7]>    <html class="ie7 oldie"> <![endif]-->
    <!--[if IE 8]>    <html class="ie8 oldie"> <![endif]-->
    <!--[if gt IE 8]><!-->
    <html class="">
    <!--<![endif]-->
    <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Kyle Childress Foundation</title>
    <link href="boilerplate.css" rel="stylesheet" type="text/css">
    <link href="/layout.css" rel="stylesheet" type="text/css">
    <!--
    To learn more about the conditional comments around the html tags at the top of the file:
    paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
    Do the following if you're using your customized build of modernizr (http://www.modernizr.com/):
    * insert the link to your js here
    * remove the link below to the html5shiv
    * add the "no-js" class to the html tags at the top
    * you can also remove the link to respond.min.js if you included the MQ Polyfill in your modernizr build
    -->
    <!--[if lt IE 9]>
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <script src="respond.min.js"></script>
    </head>
    <body>
    <div class="gridContainer clearfix">
      <div id="animation"><img src="images/images/kyleanimation2014gif2.gif" alt="kylechildressfoundationanimation"></div>
    </div>
    </body>
    </html>
    this is my css
    @charset "UTF-8";
    @import url("/kyle.css");
    /* Simple fluid media
       Note: Fluid media requires that you remove the media's height and width attributes from the HTML
       http://www.alistapart.com/articles/fluid-images/
    img, object, embed, video {
        max-width: 100%;
    /* IE 6 does not support max-width so default to width 100% */
    .ie6 img {
        width:100%;
        Dreamweaver Fluid Grid Properties
        dw-num-cols-mobile:        5;
        dw-num-cols-tablet:        8;
        dw-num-cols-desktop:    10;
        dw-gutter-percentage:    25;
        Inspiration from "Responsive Web Design" by Ethan Marcotte
        http://www.alistapart.com/articles/responsive-web-design
        and Golden Grid System by Joni Korpi
        http://goldengridsystem.com/
    /* Mobile Layout: 480px and below. */
    .gridContainer {
        margin-left: auto;
        margin-right: auto;
        width: 87.36%;
        padding-left: 1.82%;
        padding-right: 1.82%;
    #LayoutDiv1 {
        clear: both;
        float: left;
        margin-left: 0;
        width: 100%;
        display: block;
    #animation {
        clear: both;
        float: left;
        margin-left: 0;
        width: 100%;
        display: block;
    #image {
        clear: both;
        float: left;
        margin-left: 0;
        width: 100%;
        display: block;
    /* Tablet Layout: 481px to 768px. Inherits styles from: Mobile Layout. */
    @media only screen and (min-width: 481px) {
    .gridContainer {
        width: 90.675%;
        padding-left: 1.1625%;
        padding-right: 1.1625%;
    #LayoutDiv1 {
        clear: both;
        float: left;
        margin-left: 0;
        width: 100%;
        display: block;
    #animation {
        clear: both;
        float: left;
        margin-left: 0;
        width: 100%;
        display: block;
    #image {
        clear: both;
        float: left;
        margin-left: 0;
        width: 100%;
        display: block;
    /* Desktop Layout: 769px to a max of 1232px.  Inherits styles from: Mobile Layout and Tablet Layout. */
    @media only screen and (min-width: 769px) {
    .gridContainer {
        width: 88.2%;
        max-width: 1232px;
        padding-left: 0.9%;
        padding-right: 0.9%;
        margin: auto;
    #LayoutDiv1 {
        clear: both;
        float: left;
        margin-left: 0;
        width: 100%;
        display: block;
    #animation {
        clear: both;
        float: left;
        margin-left: 0;
        width: 100%;
        display: block;
    #image {
        clear: both;
        float: left;
        margin-left: 0;
        width: 100%;
        display: block;
    the animation GIF is 700 x 908
    I changed the code from max-width to just width 100% but it still did not work ,, please help

  • How to make the attribute of type object private

    Hi All!
    How to make the attributes of type object private ?
    regards
    Sanjeeb Bose
    Kolkata India

    Sanjeeb,
    Object encapsulation can be enforced at your client/mid-tier API level (e.g., Java, C++).
    Regards,
    Geoff
    Hi All!
    How to make the attributes of type object private ?
    regards
    Sanjeeb Bose
    Kolkata India

  • How to make a group for selectd Object javascript

    How to make a group for selectd Object javascript

    There is currently no native way to email groups from iPad.
    The only way to do this is if your recipients are already members a a distribution group controlled elsewhere such as a Google Group or an  Exchange Organisation, then you can email the distribution group address which will then in turn forward to the individual email address of the members.
    Does it have to be email as currently you would have to add each recipient to the email manually.
    iOS to my knowledge doesn't support contact groups in context other than organisation.

  • How to make it selected when clicked and open popup

    Hi,
    I 've a form in the parent page with many form elements.
    I've 2 radio buttons with values "Yes" and "No". I am opening a modal popup when clicked on "Yes" radio button. The modal popup is opening fine.
    But when I click "Yes", it' s not selected. After modal popup is closed, when I return to parent page, the option "Yes" is still not selected.
    How to make it selected when clicked and open popup?

    Perhaps try moving the application to your preferred desktop and then right-click it's dock icon > options > Assign to This Desktop.

  • How to make session invalid when user refresh the page?

    How to make session invalid when user refresh the page?

    I have a <form> in a JSP file that has another JSP file as an action.
    I have main.jsp that has <form> with action.jsp file as an action.
    Now when I submit the <form>, request forwarded to action.jsp and it will take the action. But this file is taking so long, hence user refresh the page again and again, hence duplicate request processing is occuring.
    I want to prevent this.

  • I want to wipeout my Ipod,  on my Itouch under settings, then can I connect to Itunes and download everything again??   Help something happened when it was syncing and now Itouch is all jammed up

    I need to wipeout my Ipod Itouch, something happened when it was syncing and now my Itouch is all jammed up.  When plugged into Itunes it will not restore to factory setting, can I just do this on the Settings section, General, reset button on myItouch, "erase all content and settings"   Help

    Did you already try to connect in recovery mode and restore "as new ipod"? http://support.apple.com/kb/HT1808

  • My ipod screen shows " this ipod touch hasn't been backed up in 10 weeks .backups happen when this ipod touch is plugged in locked and connected to wifi" ipod screen is locked and not opening .any solution

    my ipod screen shows " this ipod touch hasn't been backed up in 10 weeks .backups happen when this ipod touch is plugged in locked and connected to wifi" ipod screen is locked and not opening .any solution

    - Reset the iOS device. Nothing will be lost      
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Then go to Settings>iCloud>Storage and Backup and either turn off iCloud backup or backup to iCloud

  • When call someone touching another,waitng does not appear on iphone5

    when call someone touching another,waitng does not appear on iphone5

    Under (system prefernces>security and privacy) do you have 'disable automatic login' checked?
    I have it checked which means I must sign in to my account. To change the picture go to system preferences>users and groups. Hover over the picture and click on the glif at the bottom right of the picture.

  • Normalizing. How To. Or Make It Happen When Bouncing

    I had to create some new tracks because the old tracks were damaged.I use only one track for voice overs, not several. I noticed when I record on these newly tracks and bounce it as an mp3 to my desktop, it doesn't do a normalizing and convert action. The old tracks always did. How can I make this happen with these new tracks.
    Logic Pro 9.1.8 Mountain Lion

    yeah, thanks, I found it by viewing youtube tutorials. Thanks for your reply

  • How do I make something happen only once on a true condition in a loop

    So I have a way of doing this, but it uses a dreaded local variable, and seems to me that it might be unreliable.
    What I want to happen is to have something happen only once on a condition that will remain true. What I need is to set something after a given amount of time, but I only want to set it once after that time has been reached. Problem is, if I use a range, it could be true more than once, if I use a greater than, it'll be true every time after the set time, and if I use an equal, there's no way to know that the particular millisecond value will even appear in the loop.
    Maybe I'm wrong in even using those comparison functions... Any ideas would be greatly appreciated. See the attached vi for a better look at what I'm trying to do... (v7.0)
    Thanks,
    Geoff
    Attachments:
    Question.vi ‏16 KB

    The "Idle" state that the help file refers to is the "non-running"
    state. The Top Level VI must end execution before any "First Time" VIs will
    return TRUE after being called initially.
    Therefore, if your application calls a subVI at the beginning of the
    Test portion, on the next iteration of the loop it will return FALSE
    from that subVI, since your main VI never stopped running, and received
    a TRUE from the "First Time" on the initial test loop.
    If you have code that you want to execute only on the first run of your
    entire program, "First Time" should work fine. If you have code that
    you only want to execute on the first iteration of just the Test loop,
    the "First Time" VI is not ideal.
    I think that shift registers are going to provide the best solution,
    however you mentioned that for your particular application that is not
    ideal. Could you describe a little bit more why shift registers are
    problematic?
    Thanks Geoff, let us know.
    DWeiland
    Applications Engineer
    National Instruments
    www.ni.com/support
    Dan Weiland

  • How to make a copy of DefaultStyledDocument Object for RTF text ?

    Hi All,
    In my application, I need to copy RTF text from Org_Default_Styled_Document to New_Default_Styled_Document (both are independent objects.)
    For this I wrote the below method :
    public DefaultStyledDocument copyRTFStyledDocument(DefaultStyledDocument  Org_Default_Styled_Document)
              DefaultStyledDocument New_Default_Styled_Document = null;
              try
                            // writing RTF byte[] to output stream.
                   ByteArrayOutputStream bOData = new ByteArrayOutputStream();
                   rtfKitEditor.write(bOData, Org_Default_Styled_Document, 0, Org_Default_Styled_Document.getLength());
                            // reading RTF byte[] from input stream.
                   ByteArrayInputStream bIData = new ByteArrayInputStream(bOData.toByteArray());
                   New_Default_Styled_Document = new DefaultStyledDocument();
                   rtfKitEditor.read(bIData, New_Default_Styled_Document, 0);
              }  catch(BadLocationException e)   {
                e.printStackTrace();
              catch(IOException e)        {
                e.printStackTrace();
           return New_Default_Styled_Document;
      }I am able to see an extra 'enter' character (i.e, "\n") added to New_Default_Styled_Document.
    I tried to figure out the problem by digging API classes like RTFEditorKit.java and RTFGenerator.java, I observed that an extra 'enter' character is adding at the below method of RTFGenerator.java
    public void writeRTFTrailer()
        throws IOException
        writeEndgroup();
        writeLineBreak();
    public void writeLineBreak()
        throws IOException
        writeRawString("\n");
        afterKeyword = false;
    }I used
    New_Default_Styled_Document.remove(Org_Default_Styled_Document_Length, 1); to remove the extra 'enter character from New_Default_Styled_Document every time. Its workaround only.
    Can any one please help me how to make a new copy / clone of DefaultStyledDocument ? Is there any alternate solution which does not add any extra character when we make a copy of DefaultStyledDocument ?
    Its very urgent. I am trying a lot.
    Thanks in advance
    Satya.

    You will need to define an Organization hierarchy.
    1. Define your company as a Business Group and define the 3 child companies as Organizations (HR Organizations).
    2. Define Organization Hierarchy with 3 child organizations as child of the Business Group. You can further add organizations as childs to those three in the hierarchy.
    3. Define 3 security profiles (Security > Profile) marking View Employees / Contingent workers / Applications / Contacts as restricted. Click in the Organization Security tab. Select the option of Secure by Organization hierarchy option. Click in Organization hierarchy and select the one defined in step 2. Click in top Organization and select Company 1 / 2 /3 for each of the Security Profile. Check the box Include Top Organization. Also select the check box Restrict on Individual assignments option. Save the security profile(s).
    4. Define 3 HR Responsibilities (e.g. Company 1 HR, Company 2 HR, Company 3 HR). Using system profile HR:Security Profile, attach corresponding security profile to each of the responsibilities. Profile value of HR: Business Group is same for all the responsibilities.
    5. Run the Concurrent Program "Security List Maintenance" for each of the security profile.
    From now, One responsibility can not view data from another Organization and its child Orgs.

  • How to make a contour of an object/face

    Hi All,
    Okay, so I'm trying to make something like this: http://img5.imageshack.us/img5/8335/headfn.png
    I have a picture and just want to make a contour.
    But I have 2 problems:
    1. I cannot make a smooth path
    2. I cannot fill the path with gradient color
    What is the best way to achieve a similar result like the posted image?

    Do you have illustrator?  If it was me i would do a large portion of it in there and then composite into PS.  I would place and live trace or copy and paste your object into illustrator and turn it into path with a live trace and expand, then offset the path, apply no fill, and create a small brush which is just a small circle and stroke the path.  You can c and p back into PS and clip a grungy fill over your original object shape to achieve desired effect.  This may be a bit of guerilla tactics, and you may not want to use AI but thats just how I'd think to do it. The other suggestion I'm sure is better but I'm not as familiar and if you have AI you could always give it a shot. hope this helps
    -Trevor
    <link removed>

  • How to make Rectangle persistant when another rectangle is drawn

    Hello,
    Please some one help with this,
    actually what i m tryin to do is, when i mouse click n drag the mouse n release it , i want a rectangle to be drawn.
    and when i click on another location then also i want a rectangle to be drawn and the previusly drawn rectangle should also be vissible.
    I am able to draw the rectangle but whe i draw a new rectangle the old rectangle vanishes.
    i should be able to draw any number of rectangles, and all the rectangle
    should be vissible.
    can any one plz help me with this.
    Plz help
    Regards
    Sanam
    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    <applet code = "Test.class" width = 1020 height = 600>
    </applet>
    public class Test extends Applet implements MouseListener
         private Color color = Color.black;
         int x1, y1, x2, y2 = 0;
         int width, height = 0;
         int startX, startY = 0;
         boolean drawObject = false;
         boolean moveObject = false;
         Rectangle myRectangle = new Rectangle(startX,startY,width,height);
         public void init()
              setBackground(Color.gray);
              addMouseListener(this);
              int i = 5;
         public void paint(Graphics g)
              //recover Graphics2D
              Graphics2D g2 = (Graphics2D)g;
              g2.setColor(color);
              if(drawObject)
                   //create Rectangle Object
                   myRectangle = new Rectangle(startX,startY,width,height);
              else if (moveObject)
                   myRectangle.setLocation(x2,y2);
              g2.draw(myRectangle);
         //--> Start of section dealing with Mouse Events
         public void mouseClicked(MouseEvent e)
         public void mouseEntered(MouseEvent e)
         public void mouseExited(MouseEvent e)
         public void mousePressed(MouseEvent e)
              x1 = e.getX();
              y1 = e.getY();
              //Check to see if mouse is pressed in the current rectangle.
              if(myRectangle.contains(x1,y1))
                   //move the object instead of moving it
                   drawObject = false;
                   moveObject = true;
              else
                   //draw the object, don't move
                   drawObject = true;
                   moveObject = false;
         public void mouseReleased(MouseEvent e)
              //get the positions of where the mouse was released
              x2 = e.getX();
              y2 = e.getY();
              if (x1 != x2 && y1 != y2)
                   //maths to work out where to draw the object
                   if(x1 < x2 && y1 < y2)
                   {//1
                        startX = x1;
                        startY = y1;
                        height = y2 - y1;
                        width = x2 - x1;
                   else if (x1 > x2 && y1 > y2)
                   {//2
                        startX = x2;
                        startY = y2;
                        height = y1 - y2;
                        width = x1 - x2;
                   else if (x1 > x2 && y1 < y2)
                   {//3
                             startX = x2;
                        startY = y1;
                        height = y2 - y1;
                        width = x1 - x2;
                   else if (x1 < x2 && y1 > y2)
                   {//4
                        startX = x1;
                        startY = y2;
                        height = y1 - y2;
                        width = x2 - x1;
              repaint();
    }

    Every time you repaint it only draws what you tell it to, so how bout something like this:
    Add a vector to store the rectangles:
    Vector<Rectangle> rectangles = new Vector<Rectangle>();In paint when you create a new rectangle add it to the vector:
             public void paint(Graphics g) {
              //recover Graphics2D
              Graphics2D g2 = (Graphics2D)g;
              g2.setColor(color);
              if(drawObject) {
                   //create Rectangle Object
                   myRectangle = new Rectangle(startX,startY,width,height);
                   rectangles.add(myRectangle);
              } else if (moveObject) {
                   myRectangle.setLocation(x2,y2);
              for (int i = 0; i < rectangles.size(); i++) {
                   g2.draw(rectangles.get(o));
          }When you check to see if the click is in a rectangle check them all:
         //Check to see if mouse is pressed in the current rectangle.
         for (int i = 0; i < rectangles.size; i++) {
              if(rectangles.get(i).contains(x1,y1)) {
                   //move the object instead of moving it
                   drawObject = false;
                   moveObject = true;
                   myRectangle = rectangles.get(i);
         }Just briefly looked over your code so there may be a few other places you need to change. Also if you post code its a lot easier to read if you put it in code tags.
    Alex.

Maybe you are looking for