Draggable menu

i’m a rookie-experienced flasher and read the draggable menu pt 1 to do the sliding menu and i got stuck in step ix… am i supposed to be able to make the dragger follow the mouse when clicked (not held) cos’ my dragger only moves when i hold the mouse button… please help!

thanks :slight_smile:

here’s the page for quick ref. Draggable Menu - Part 1

Well, they have theirs set up to only drag on press and to stop dragging on release. but you can change it easily.

What you need to do is change the script on the button to be a toggle, rather than an “on/off”. Here’s a simple way of doing so.

you can discard the on press script and just use this.


on (release) {
    if(!trip){
        dragging = 1 ;
        trip=true;
    }
    if(trip){
        dragging = 0 ;
        trip=false;
    }
}

Since trip is undefined upon creation of the button it is not equal to true. So the first time the button is pressed it sees that trip is not true, sets dragging to 1 and sets trip to true. Then the second time the button is pressed it sees that trip is true, sets dragging to 0 and sets trip to false.

Is that what you were looking for?

this is something about the sliding menu

is there supposed to be a .fla file with no coding done in the sliding menu tutorial?