I have a movie with a draggable movieclip. It works, when I preview the movie, and save it as an swf file itself.
But when I load it through another .swf file for some reason the movie clip isn’t draggable. Here’s the code that I’m using now.
on (press) {
startDrag("_root.formmail", false, 110, 200, 618, 200);
}
on (release) {
stopDrag();
}
Is there something else I have to add in the actionscript?
its the "_root " think. Try using this or nothing at all and see if that works, I was just doing this tonight, and I think _root. might just be the _root.ofyourproblem…
if the button is inside a movie clip which you wish to drag the code would be this.
on (press) {
startDrag("_parent", false, 110, 200, 618, 200);
}
on (release) {
stopDrag();
}
if that doesn’t work (because I’m not sure if _parent will work alone) you can try this…
on (press) {
startDrag("_parent._parent.formmail", false, 110, 200, 618, 200);
}
on (release) {
stopDrag();
}
Now… there is a matter of those restrict movement numbers. I dont’ know if startDrag uses global or local locations to restrict so you might end up needing to change those… probebly not… but if you notice the object moves all over the place, or to a place where you don’t want it to be… that’s probebly the reason.
Nice… that’s really quite cool. It makes sense too… just not from a Flash5.0 standing… I guess the program is simply becoming more ‘intelligent’ as they progress through their versions.