draggable mask issue in movie clip

  • susancbk
  • Proficient
  • Proficient
  • susancbk
  • Posts: 293
  • Loc: New York City

Post 3+ Months Ago

i had this mask technique in its own scene but decided I wanted to put it in a movie clip which broke it.

The technique is to show one picture and have a draggable circle which reveals another picture. It is located in a movie clip called "radioOpticalMask"

my navigation is still a mess, but to navigate to it when published heres how you get to it
lessons : lesson one : interactive games and classroom activities : interactive telescope


if anyone can take a look at my actionscript and provide some insight that'd help a lot! Thanks
http://www.susancbk.com/sb/pari/applica ... iosky2.fla
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • [SteF]
  • Beginner
  • Beginner
  • [SteF]
  • Posts: 58
  • Loc: Belgium

Post 3+ Months Ago

change the following things in your code:
startDrag(this, true, 125, 340, 525, 475);
=> mask_mc.startDrag();

stopDrag();
=> mask_mc.stopDrag();

you also need to make sure that your mask_mc can not go outside of your picture...
  • susancbk
  • Proficient
  • Proficient
  • susancbk
  • Posts: 293
  • Loc: New York City

Post 3+ Months Ago

how do I make sure my mask_mc can not go outside of the picture? do I put the coordinates in hte startDrag()?
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Actually the only problem with your original code is the coordinates for the confined startDrag(). Since the startDrag is in a dynamic event handler, the locator 'this' can be used.

But since your coordinates for the drag are what they are, your clip is jumping out of view because it isn't the true coordinates of the image rectangle. This is because you are locating the draggable clip inside a movieclip symbol that is rotated. The local coordinates within that clip change (the x,y grid rotates with the clip for all clips within it)


[edit]wait, no i think i confused myself on your setup[/edit]
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Ohhh, wait a tick, I see the problem.

You are setting your coordinates as if the registration point is in the upper left corner of the clip, but your registration point is more towards the center (see that little + looking thing up by the upper-right of the mask circle)

Something like this should work, or be closer to what you wanted (minor coordinate adjustments may be required)
Code: [ Select ]
startDrag(this, true, -230, 0, 200, 200);

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 17 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
 
 

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