Skip to main content
Inspiring
April 8, 2013
Answered

AS2 drag and drop a masked content from loadMovie clip

  • April 8, 2013
  • 1 reply
  • 828 views

In the main content, when I have a movie clip like this   a1.a2.a3 while  a3 inside a2 and a2 inside a1, and a2 is a masked layer movie clip.

I can drag and drop the masked content (while a1 stay still) with like this   a1.a2.onPress = function () { startDrag(this); }  and a1.a2.onRelease = function () { stopDrag(); }

but then what i need is a1 stay in main content, while moved a2.a3 to an external .swf, and use loadMovie to put .swf(a2.a3) back into a1, and I can still drag/drop a2.a3 when a1 stay still.

I tried differetn methods they all not working.  I've learned that you need to create another MC inside a1 like this a1.a4.a2.a3 ( while a2.a3 from loadMovie clip). it only work if I want to drag a1. but if I want to drag masked content a2.a3 it still doesn't.

I really need help it's a project for work.

This topic has been closed for replies.
Correct answer kglad

after loading is complete, apply your drag code to a1.a4, the load target that contains a2 and its children (after loading is complete).

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
April 8, 2013

after loading is complete, apply your drag code to a1.a4, the load target that contains a2 and its children (after loading is complete).

Inspiring
April 8, 2013

if I apply drag to a1.a4 , it will still move the whole thing but not just masked content which is in a2.a3

I pretty much given up on this one at this point..   gonna just throw everything into just one big swf save the struggling time,

but thank  you for your input.

kglad
Community Expert
Community Expert
April 8, 2013

you're welcome.

but my suggestion will work. 

however, if you made a2 a child of the main timeline instead of the main timeline, apply startDrag() to the load target dot a2.