PDA

View Full Version : draggable windows



hzane
January 9th, 2004, 01:03 AM
hey folks what am i doing wrong?

I have a gif as my primary scene - I am simply trying to make a button w/ graphics in it and the following AS attached to the button:

on (press) {
startDrag ("");
}

on (release) {
stopDrag ();
}



but when i test it instead of the object dragging the object works like a handle and drags my gif around the screen instead of just the button...

Why is this???

norie
January 9th, 2004, 05:07 AM
//on the button itself!
on(release){
stopDrag();
}
on(press){
startDrag(this,false,0,0,Stage.width, Stage.height);
}

hzane
January 10th, 2004, 05:12 PM
looks like both are scripts work correctly when used in the right spot.

My initial attempts were failing becasue I was attaching the buttons to my main movie.
Once I attached the buttons to individual mclips and those mc's to the main movie - it was bau.

so cool.
And now a vampire smiley: :vamp: