Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

drag bug?

Status
Not open for further replies.

frozenpeas

Technical User
Sep 13, 2001
893
CA
I have built a game in Flash 5. It is essentially a skeleton-building game where the user drags and drops the scattered bones to rebuild the skeleton.

The first problem I overcame was that since the bones were on different layers, the drag would stop when a bone was dragged across another bone which was on a higher layer. I used swapDepths to beat that.

I finished the game and thought I'd would use the 'lock Mouse to center' feature on the drag. So I added that to every bone. Since doing this, some bones are no longer draggable.

I have tried:

Code:
on (press) {
    startDrag ("this", true);
    this.swapDepths(_root.swap);
}

which makes some bones undraggable, and:

Code:
on (press) {
    startDrag ("", true);
    this.swapDepths(_root.swap);
}

which makes some bones undraggable, and:

Code:
on (press) {
    startDrag ("_root.instancename", true);
    this.swapDepths(_root.swap);
}

which makes all of the bones undraggable.

I am unable to post an fla because this is for work.

Does anyone have any ideas? Or am I just going to have to live with no 'lock to center'?

Thanks.
 
Don't see why using 'lock Mouse to center' would change anything... Are you sure it allways did work previously?

One thing that might work and you haven't tried is not using "" as:

on (press) {
startDrag (this, true);
this.swapDepths(_root.swap);
}
Or...
on (press) {
startDrag (_root.instancename, true);
this.swapDepths(_root.swap);
}

You can allways comment out the swapDepths line also, to at least see if that's the line causing the problem.
And finally, try to switch a bone that's not working unto a layer where one does, to see if the different layers could be the problem!

Regards,
wink4.gif
ldnewbie
 
It did indeed work before.

I tried what you suggested (which was what I tried before, but minus the quotes) but ended up with the same result: some bones remain draggable while others become draggable.

I need the swapDepths action, so I guess I'll have to live without the 'lock to center'... *grumble*

It is very strange that the lock to center would cause this problem. Oh, it also disables some of the swapDepths actions.

I think it's a bug. :(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top