Restrict the drag area

  • chrisjmcqueen
  • Born
  • Born
  • chrisjmcqueen
  • Posts: 4
  • Loc: Belfast

Post 3+ Months Ago

I want to put a dragable movie clip unto my main movie

I have got it dragging, but I dont know any code to restrict the area the user can drag the object in.

Can I state the co-ordinates it can drag within ?



Thanks you guys, I know nothing about actionscript
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • phpSelectah
  • Student
  • Student
  • User avatar
  • Posts: 97

Post 3+ Months Ago

yes you can.

The arguments for the drag function allow for spatial coordinates:

startDrag(target,[lock ,left ,top ,right,bottom]);

http://www.actionscript.com/reference/startdrag.php
  • chrisjmcqueen
  • Born
  • Born
  • chrisjmcqueen
  • Posts: 4
  • Loc: Belfast

Post 3+ Months Ago

I dont know enough about actionscript to fill in the blanks, useless I know.

What should I call the target, is it this. ?

what is the lock bit all about ?

Can somebody give me an example, I will be able to adapt it from there .



Thanks
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Go to the link in phpSelectahs post. It tells you what "the blanks" mean.
  • chrisjmcqueen
  • Born
  • Born
  • chrisjmcqueen
  • Posts: 4
  • Loc: Belfast

Post 3+ Months Ago

Thanks got it workin, I was just confused because I thought it would require an x and y coord for one point.

Thanks for the help :lol:

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 8 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.