A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: change depth on drag and drop

  1. #1
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404

    change depth on drag and drop

    Ok so basically I have the codes I need to make my project work but the problem is when I put my drag and drop code with my swap depth on hittest code my drag code stops working heeres the codes:


    code for swap depth on a hit test:

    Actionscript Code:
    newDepth = 2;
    Object.swapDepths(newDepth);

    Code for drag and drop:


    Actionscript Code:
    object.onPress = function(){
    object.startDrag();
    }
    object.onRelease = function(){
    object.stopDrag();
    }

  2. #2
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    actionscript Code:
    var newDepth:Number = 2;

    someClip.onPress = function(){
         this.startDrag();
         this.swapDepths(newDepth);
    }

    someClip.onRelease = function(){
        stopDrag();
    }

  3. #3
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    Thanks I realized that all I needed was closing brackets and stuff but unfortunately I go the code working but it wasnt the one I needed for my project thanks a million though for taking the time to post that.

  4. #4
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    huh?

    1.) please stop posting the same things over & over..

    think about what you want/need help with and post it. (1 time)

    2.) you had closing brackets in your original post.. so what do you mean?


    3.) if this isnt what you wanted help with..why post it 3 times?

    what IS your problem then?

  5. #5
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    1.) why are you such a dick.

    2.) I was missing closing bracket after the first 3 lines of code

    3.) I thought this was what I needed but when I got it to work, It didnt end up being exactly what I wanted so I abandoned it

    what IS your problem, get laid.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center