all groups > flash actionscript > march 2004 >
You're in the

flash actionscript

group:

Help for StartDrag


Help for StartDrag newbee2004
3/25/2004 11:30:44 PM
flash actionscript:
Hi everyone
I am very much a new bee to Flash. I am trying to create a slider bar. When I
have a button that has a blank StartDrag on Press like this
on (press) {
startDrag ("");
}
I can drag the button fine but of course it goes everywhere.
When I try to restrict the button within a rectangle, like this
on (press) {
startDrag ("", false, 0, 0, 300, 300);
}
The moment I press on the button it disappears. Do any of you experts know why
such a thing is happening and how I can fix it?
Thank you very much.
Re: Help for StartDrag johnlittlepeap NO[at]SPAM hotmail.com
3/26/2004 1:25:39 AM
[quoted text, click to view]

Hi newbee
you're code is fine, so the only thing I can think of is that you have
you're coordinates mixed up, and 0,0 for the movie clip that you want
to drag is somewhere off the stage, if this is true, try changeing the
coordinates inside the movie so that the graphic or whatever you want
to drag is on 0,0 coordinates within the movie. (That probably makes
no sense)

Re: Help for StartDrag cherryyeung
3/26/2004 9:55:39 AM
u should use a movie clip instead of button, the movie clip action script is
shown follow:
onClipEvent (load) {
top = _y;
bottom = _y+100;
left = _x;
right = _x;
}

This example can find in Flash , go to menu bar > Window > internal symbol
library >button
AddThis Social Bookmark Button