A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [help] How do is it written

  1. #1
    Senior Member Gloo pot's Avatar
    Join Date
    Aug 2005
    Location
    Australia Mate!
    Posts
    874

    [help] How do is it written

    How do u write getBounds properly i cant find any thing on here or google that can explain it and how to use it properly.

    Were is good tutorial on it, or a thread that disscusses how it works??
    92.7 Fresh FM for all your South Aussies - Doof Doof music FTW people!

  2. #2
    Monkey Moderator Lexicon's Avatar
    Join Date
    Jul 2001
    Location
    UK
    Posts
    2,038
    It returns the min and max x and y values in an object in whatever coordinate space you want ...

    Code:
    // gives its min and max coordintes in the movieClip that mc is placed
    var mcBounds = mc.getBounds(this);
    trace("xMin in the coordinate space of 'this' = "+mcBounds.xMin);
    trace("yMin in the coordinate space of 'this' = "+mcBounds.yMin);
    trace("xMax in the coordinate space of 'this' = "+mcBounds.xMax);
    trace("yMax in the coordinate space of 'this' = "+mcBounds.yMax);
    
    // gives its min and max coordintes inside mc
    var mcBounds = mc.getBounds(mc);
    trace("xMin in the coordinate space of 'mc' = "+mcBounds.xMin);
    trace("yMin in the coordinate space of 'mc' = "+mcBounds.yMin);
    trace("xMax in the coordinate space of 'mc' = "+mcBounds.xMax);
    trace("yMax in the coordinate space of 'mc' = "+mcBounds.yMax);
    www.lexicon-design.co.uk
    If we aren't supposed to eat animals, then why are they made of meat?
    If Vegetarians like animals so much, why do they eat all their food?

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center