Results 1 to 3 of 3

Thread: Using bounds

  1. #1
    Join Date
    Jan 2008
    Location
    Near Chicago
    Posts
    247
    Thanks
    105
    Thanked 2 Times in 2 Posts

    Default Using bounds

    can I set a rectangular boundry programatically rather than what I have been doing

    wich is placing a sprite and assigning event listeners like this:

    pad.addEventListener(MouseEvent.ROLL_OUT,hideThis, false, 0, true);
    and

    pad.addEventListener(MouseEvent.ROLL_OVER,showThis, false, 0, true);
    it works but I'm looking for another way to improve on an idea.

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Not sure if this is what you want, but you might want to look at the getBounds() method in the DisplayObject class.

  3. The Following User Says Thank You to Medyman For This Useful Post:

    evan (07-31-2008)

  4. #3
    Join Date
    Jan 2008
    Location
    Near Chicago
    Posts
    247
    Thanks
    105
    Thanked 2 Times in 2 Posts

    Default

    I hope this better illustrates what I have in mind:

    function testcirc(evt:Event):void
    {

    if(circ(25,25,200,200))

    {
    trace("circ is in the boundry")
    }
    }
    Last edited by evan; 08-01-2008 at 05:13 PM. Reason: Update with beter explanation

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •