This content has been marked as final. Show 5 replies
use the startDrag() parameters to limit the drag-rectangle.
I put values in the parameters section of this function but just got errors.
I am new at this. I have been scanning livedocs.adobe.com but I don't see a specific example of how to limit how far the image can be dragged. I find classes and functions like these but am not sure if or how to put these together.
flash.geom Rectangle () Constructor
I am reading a book called Essential ActionScript 3.0 but it has not been much help so far.
thanks for any help.
var myBounds:Rectangle = new Rectangle(100, 100, 100, 100);
Thank you all. It seems to have worked. I put this above my start drag function.
var myBounds:Rectangle = new Rectangle(0, 0, 2000, 2000);
The 0, 0 parameter (I think it is called) represents the upper left corner of my image. I then increased the stage background to 1000 X 1000 in document properties to make my image show up larger on my web page.
If anyone has any suggestions as to how I might learn to write actionScript 3.0 I am all ears. livedocs.adobe.com, tutorials, books, other? etc.
and check www.senocular.com to learn more about as3.