Another StartDrag
Hi,
I had a bug on my site http://www.balanceimages.org with using 2 startDrag scripts and one cancelling the other out. It was suggested that I use another script for one of the drags by someone on this site (one is a scroll bar and the other a hover caption) take a look and see if you find the problem.
Anyway, does anyone know of other code that'll do the same as the startDrag so both effects will work?
Thanks,
Robert Power
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 01-29-2003, 06:31 PM
View Complete Forum Thread with Replies
Sponsored Links:
StartDrag()?
I must be missing something here. I set my mc up to be dragged around the main stage when mousedown and stopDrag when mouse up. But I only want it to be able to be dragged when the mouse it over the clip. Right now when mouse down on any part of the screen it drags. What am I not doing right???? Hers my code so far:
onClipEvent (mouseDown) {
startDrag ("");
}
onClipEvent (mouseUp) {
stopDrag ();
}
This is on the mc thats loaded into the main.swf by a button action.
View Replies !
View Related
StartDrag
does anyone know how to edit startDrag (constrain to triangle) limits??
For example changing
<code>startDrag("drag-me", false,0,0,300,300)</code>
to
<code>startDrag("drag-me", false,50,50,300,0)</code>
I want to change a slider bar that has been previously created in another .fla and the movie exploper won't let me edit it??
thanks in advance
des
View Replies !
View Related
StartDrag Help
ok i made a move(site) and it loads a movie(navigation menu) so it wil lstay on top when u switch through scenes. and now i load another movie(cursor) so i can have a custom cursor...but now when u drag the navigation menu it stops dragging the cursor(MC)...can anybody help me out? basically what im trying to do is have a custom cursor and still be able to drag a menu, thanx.
View Replies !
View Related
StartDrag ?
Can someone please explain to me how the parameters of the startDrag function go. I have tried to make it work and I still cannot figure out why the clip will not drag in the place that I want it to. Thanks to all who help.
View Replies !
View Related
Help With Startdrag()
I know how to make something draggable, but I can't make it so that I can have more than one thing draggable. Can someone help me out? If I see the script I'll probably be able to figure it out.
check out my website: http://www.theultimatewebpage.com
View Replies !
View Related
StartDrag
I want to to be able to drag a movie clip but want to only be able to move it horizontally and only between to x points. I have looked up the start drag and the code is as follows.
_root.paddle.startDrag([true, 0, 0, 100, 0]);
This obviuosly doesn't work or I wouldn't be asking for help. For some reason it will still let me drag anywhere on the screen. Any help will be greatly appreciated.
View Replies !
View Related
StartDrag Help
If
StartDrag (true, 0, 225, 0, 400);
draggs from the left in the default settings, how do i get it on the right? i tried several combinations of the above with no luck.
[EDIT] Does the numbering go Left, top, bottom, right? Or does it go some other order?
[/EDIT]
-Thanks
View Replies !
View Related
StartDrag: Can You Help Me Out?
Hello,
i create a MC and i placed this code there:
on(press) {
startDrag(this, true, 0, 0, 110, 20);
}
on(release) {
this.stopDrag();
}
I have 2 questions:
1. Sometimes when i release the mouse, the MC keeps moving...why?
2. Shouldn't startDrag command work only with Buttons? What is going on here?
I am using Flash MX.
Thanks,
Miguel
View Replies !
View Related
StartDrag Help
I was wondering if anyone could help me, i have something that drags, but i want to block it so you can't drag it past a certain area.
I checked the actionscript Dictionary and it said that i can plug it into the start drag actionscript with left, right, top, and bottom; can any of you help figure out how in the hell i can do that?
View Replies !
View Related
StartDrag=WTF?
ERm...
I dont see ANYTHING wrong with this fla. For some reason i put this on a button:
code:
on (press) {
startDrag(this);
}
on (release) {
stopDrag();
}
And everything in the movie starts dragging, even thigns that arent symbols. Please help this has to be the biggest WTF question.
please help this is a huge headache.
I attached the fla with it (MX format)
View Replies !
View Related
StartDrag (i Think)
ello.
probably gonna look like a bit of a newbie ere (which i am really ) But how would i go about something like this :
Ive got 1 movie with 1 scene
The canvas size is 100x100
I have movie clip1 thats 900x100 , and contains 9x 100x100 Movie clips(2-10) that each contain buttons.
On the movie start up the movieclip1 is at 0,0.
What i need to do is on the click of each button , drag the main Movieclip1 to new co-ords.
ie to see the 2nd movie clip in the line , drag the main movieclip1 to 100,0 , for the next 200,0 etc etc.
Dont want it to just appear though (or i may aswell use scenes) , after something like a 100 frame motion tween with "50 In"
I know this could be done by creating movie clips for every possible action , but surely there has to be some faster way ?
Cheers in advance
Matt
View Replies !
View Related
Startdrag
Hi people,
I have a problem about trying to use two statdrag which is not possible in Flash MX.
what I need is to be able to drag say an apply across a table and yet able to move the table across the floor.. the tricky part is when I move the table the apple will need to stay on the table.
dragging the apply is restricted to only the top of the table .. meaning we can't leave it off the table...
I was think of nesting buttons in movie clips having startdrag in each of them .. but as we all know it won't work..
any help ?
thanks for saving the half left of my hair! :-)
Kurt.
View Replies !
View Related
I Cannot Use The StartDrag, I Must Use Something Else, Can You Help?
Hi all, I have always used the startDrag and stopDrag to move elements around the stage. However because I am using this method for my hover captions, apparently you cannot apply this method for anything else otherwise it ruins the captions position. So I need to apply a different techneque to the other elements.
Can anyone provide me with the solution for this, as I am unsure on how to achieve this. The effect I am after is similar to windows, in terms of being able to move the windows about.
But with me not being able to use the startDrag emthod I am unsure on how to go about it, any ideas??
Please help
Trev
View Replies !
View Related
StartDrag
Hi, I could really use some help!!
I have a custom cursor that uses the startDrag() command. I also have a music volume slider that uses startDrag(). When I use the slider, the cursor drag disengages and the cursor no longer moves. Even after I release the mouse button, the cursor is still immobile.
Is there any way around this? Is there a way to drag multiple objects? Or is there a way to re-engage the cursor drag after using the slider? Or is there even another way of creating a slider that doesn't use the startDrag() command? (I don't think that makes sense, but you never know.)
Please help!! I'd really appreciate it.
Thanks a lot,
Carl
View Replies !
View Related
StartDrag On A Mc Help
Ok I have a bands website I'm working on, there are five members and I want it when the mouse is over each member there is a graphic/mc with the band members name on it.
It doesn't seem real hard but I'm struggling with it.
I created a mc over each member and dropped the alpha to 0% and gave each clip an instance name numbered one - five.
Here is the code I have so far...
code: three.onRollOver = function() {
aaron_name.startDrag();
};
three.onRollOut = function() {
aaron_name.stopDrag();
};
thanks to any of you that can help me,
View Replies !
View Related
StartDrag Help
I'm building a prototype that has a draggable portlet (movieClip). When you start to drag this movieClip, I want a highlight to appear that shows where this movieClip is going to land. I guess this highlight would be the hitTarget that would be triggered when I start to drag this movieClip.
to better explain see this:
http://www.giltstudios.com/startDrag/
View Replies !
View Related
Startdrag
hey, i have two questions. the first is this. i have 12 layers w/ a movie clip in each. in that movie clip i have 2 frames, a picture in both, and a tooltip on the second. i attached startdrag (true) to the tooltip, but it goes behind the movieclip pictres on higher layers in the main timeline. is there a way to tell this startdrag object to go to the highest level of any movieclip in the entire project?
the second question i have is: i have several times when i have to do the exact same animation for several different objects. so, is there a way i can make like a "master"clip that just animates the properties (blur, size, etc.) then i can just dynamically add each clip to that animated one? basically i only want to have to animate once for all 12 objects. if this isnt too hard or tedious please help me out. THANKS!
View Replies !
View Related
StartDrag
Hi I am trying to use startDrag by referring to a movie clip that I have called "box1_mc". For some reason it isn't working. Can anyone help me?
Thank you.
In the Actions Layer, frame 1 I have the following:
box1_mc.onPress = function() {
this.startDrag;
}
View Replies !
View Related
Help With StartDrag
Hey all, here is what i am looking to do and am having a bit of trouble....I want to pull in external images, set the depths, let the user drag where ever (all while bringing the clicked to the front) and then click a reset button to put them all back at the coords they started with (so i guess they will need coordinates too in the beginning.
Like i said, im new to trying all this dynamic coding in flash so any help would greatly be appreciated... thanks again...
Someone did this for me but im not sure about the rest of it...
ActionScript Code:
var w:Number = 100;
var topDepth:Number = 5;
for(var i:Number = 0; i < topDepth; i++) {
var depth:Number = i + 1;
var square:MovieClip = _root.createEmptyMovieClip("clip" + depth, depth);
square.lineStyle(0, 0, 100);
square.beginFill(0xFF0000, 100);
square.lineTo(w, 0);
square.lineTo(w, w);
square.lineTo(0, w);
square.lineTo(0, 0);
square.endFill();
square._x = i * w / 3;
square._y = i * w / 3;
square.onPress = pressHandler;
square.onRelease = square.onReleaseOutside = releaseHandler;
}
function pressHandler():Void {
this.startDrag();
this.onMouseMove = updateHandler;
this.swapDepths(topDepth);
}
function releaseHandler():Void {
this.stopDrag();
}
function updateHandler():Void {
updateAfterEvent();
}
View Replies !
View Related
StartDrag
Hi all
I have a flash file in which there is a movieClip that moves up and down as you move your mouse. The code I used is
onClipEvent (load) {
startDrag (this, true, 0, 600, 0, 0);
}
In this movieClip, there are some buttons that are not working once I put the code on the MC.
How can I make my buttons work while the clip is dragging ?
View Replies !
View Related
StartDrag()
I'm trying to use the startDrag method with an onRollOver and onRollOut function but it works for the rollOver event but the onRollOut doesn't seem to trigger.
If I take the startDrag method out and do a trace the onRollOut then works.
Somehow the startDrag method is over riding something.
Has anyone else had this problem?
Thanks
ActionScript Code:
dragTop = 60;
dragBottom = 100;
btnDrag.onRollOver = function() {
btnDrag.startDrag(false, 72, dragTop, 72, dragBottom);
this.dragging = true;
updateAfterEvent();
};
btnDrag.onRollOut = function() {
btnDrag.stopDrag();
this.dragging = false;
};
View Replies !
View Related
Help With StartDrag
I've got a "filmstrip" in this movie. Each frame is a different picture. When the user drags the filmstrip to the left, I'd like the last image on the right to go no further than necessary to have it's right edge visible. And when they drag the strip to the right, I'd like the first (left) image to stop where it's left edge is visible. I've played around with the parameters in startDrag, but I can't seem to figure it out. Can anyone take a look at my clip and let me know where I'm off? Thanks.
View Replies !
View Related
StartDrag() X 2? Help Please...
Hi. I need a custom cursor to work with an MC that I am already using the startDrag(); method on. I know, in theory, startDrag(); can only be used for the mc it's applied and can't be included to ALSO drag another MC that's nested inside the parent MC, i.e. a custom cursor. So...I am really curious as to how to achieve this. Here is the code I am currently working with:
ActionScript Code:
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
drag = true;
startDrag(this, false, 0, 0, 800, 600);
Mouse.hide();
}
}
onClipEvent (mouseUp) {
drag = false;
stopDrag();
Mouse.show();
}
I believe I can use the _xmouse & _ymouse properties to accomplish this, but haven't experimented enough with this method and lack the knowledge to accomplish it on my own! So I turn to you, Flash Guru Gods/Godesses for your help and knowledge!
Any help or advise is greatly appreciated. Thanks!
morosa
View Replies !
View Related
StartDrag With AS3
I'll get over it, but could use some help; here's what I am trying to do. I have an image of a bee, it's an instance on stage (ins_bee), I simply want to use it as a mouse pointer, but cannot seem to identify the bounds correctly:
import flash.events.MouseEvent;
Mouse.hide();
stage.addEventListener(MouseEvent.MOUSE_MOVE,moveBee);
function moveBee(e:MouseEvent):void {
this.ins_bee.startDrag(true, ***need help here***);
}
View Replies !
View Related
StartDrag Help
Hi,
I have a movieclip called "dragger" that slides along a movie "slidepath". I used the startDrag and stopDrag commands...
The code I am using is below...
The dragger slides beautifully along it's path...
However, I would like to load a different movie into a different level when the "dragger" is over each target square...
What is my best approach? Should I call each square a button to load each movie? Should I have that movie unload from that level before loading a new movie into that level upon going to the next target square? Should I give aset of coordinates for each target square with a load movie command in an if statement?
Please help!
thanks
Attach Code
"dragger" code:
on (press) {
startDrag("", false, 540,450,926,450);
}
on (release) {
stopDrag();
}
---------------------------------------------------------------------------------
root_frame code:
function floatTo(theSquare) {
loadMovieNum ("eventsWRD.swf",3);
DraggerTargetLoc = slidepath._x + (theSquare * slidepathPieceWidth) - (slidepathPieceWidth / 2)
-----------------------------------------------------------------------------------------------
slider bar code:
function floatTo(theSquare) {
loadMovieNum ("eventsWRD.swf",3);
DraggerTargetLoc = slidepath._x + (thePiece * slidepathPieceWidth) - (slidepathPieceWidth / 2)
View Replies !
View Related
StartDrag
Hi, I had a problem for a game I am making. I am trying to make a sliding invitory (can't spell) and it doesn't wanna work for me.
This what I have so far:
on (press) {
startDrag(this);
}
on (release) {
stopDrag();
}
I don't know what settings to use in the startDrag option. Please help?
View Replies !
View Related
Please Help With StartDrag
Okay, so I have my startDrag actionscript working marvelously. What I have are file folders on a desk and you can click on one of the folders tabs and it comes to the front and you can click and hold and drag the file around.
My question is, is there a way to script like a "reset" button of sorts that you can click on and the folders can go back to their original starting position? When you drag them around too much, they start to cover the other folders.
Thanks in advance
View Replies !
View Related
StartDrag Help
I'm building a prototype that has a draggable portlet (movieClip). When you start to drag this movieClip, I want a highlight to appear that shows where this movieClip is going to land. I guess this highlight would be the hitTarget that would be triggered when I start to drag this movieClip.
to better explain see this:
http://www.giltstudios.com/startDrag/
View Replies !
View Related
StartDrag()
hello.
I am having issues with startDrag().
I have a movie clip called circle.
Inside circle, I have a movie clip called circleFill and another called circleOutline.
onEnterFrame, this movieClip is duplicated 4 times.
______________________
When I use this:
private function onPressNow(event:MouseEvent):void
{
startDrag();
}
IT DRAGS ALL 4 MOVIECLIPS.
______________________
When I use this:
private function onPressNow(event:MouseEvent):void
{
event.target.startDrag();
}
IT DRAGS circleFill and NOT outlineFill + circleFill.
MY QUESTION:
how can I make it drag my movieClip called circle? (meaning both circleFill and outlineFill)
View Replies !
View Related
Help With StartDrag
Okey so I click on my little button in my movie and write in the following code
ActionScript Code:
on(press) {this.startDrag(false);}on(release) {stopDrag();}
It looks ok to me, but when i preview it, instead of draggin' the button it drags the whole movie??? =S
anyone know wht the prob is?
View Replies !
View Related
StartDrag
Hi, I had a problem for a game I am making. I am trying to make a sliding invitory (can't spell) and it doesn't wanna work for me.
This what I have so far:
on (press) {
startDrag(this);
}
on (release) {
stopDrag();
}
I don't know what settings to use in the startDrag option. Please help?
View Replies !
View Related
[as] StartDrag
This is the code I'm using:
ActionScript Code:
on (press) {
// object, boolean true or false,left(x),top(y),right(x),bottom(y)
startDrag("_root.news_mc", false, 30, 4, 450.9, 733);
}
on (release) {
stopDrag ();
}
For some reason it will only constrain the mc I'm dragging to the left and not to the right or bottom. for the top it constrains it to a different value. I can't figure out what I did wrong. Help!
View Replies !
View Related
Startdrag While Following Guideline
Hi,
I'm trying to make a menu with some object following a line. I would like those object to follow the mouse when you pass near them. I tried to use the commands startdrag and stopdrag to make them follow my mouse .. with success but then they don't follow my guideline ... anyone has an idea how to do that ??
View Replies !
View Related
StartDrag And Rotation
Hi, what I am trying to do is have two or three dials that all work (i.e: spin)independantly of each other dependant upon the position of the mouse.
I have managed to get one to work using the following code that is attached in a blank MC:
FRAME 1
xPos = getProperty("../dragControl2", _x);
xPos = xPos+(10);
setProperty ("../nav2", _rotation, getProperty("../nav2", _rotation)-(xPos/75));
FRAME 2
gotoAndPlay (_currentframe-1);
FRAME 3
stop ();
Also I use the startDrag function on the first frame of the MC called nav2.
Every time I try to duplicate this on the main stage it seems to disable the previous dial and only allows one dial at a time to work.
Not very well explained but can anyone help please
Many thanks
Rich
View Replies !
View Related
Replacing Startdrag..?
Hello!
Basically i wanted to know if anyone could help me with my tooltip script. so far ive managed to create both a static tooltip which appears over the MC/button, and a Startdrag style MC which looks ok but doesnt really lock to the mouse.
I have a MC with a button in side it. On the MC timeline
i have the tooltip MC which is shown or hidden depending the rollover or rollout of the MC/button.
eg.
on (rollOver,dragOver){
tooltip.gotoAndStop("show");
}
on(rollOut, dragOut){
tooltip.gotoAndStop("hide");
}
okay, this works great but it looks real static.
all i wanna do is to be able to attach the tooltip MC to the x and y position of the mouse only when the mouse is over the MC/button.
ive tried using this:
on (rollOver,dragOver){
tooltip._x = _xmouse;
tooltip._y = _ymouse;
tooltip.gotoAndStop("show");
this also kinda works but the tooltip appears at the edge of where you rollover and doesnt follow the cursor over the MC/button.
I need to constantly update the postion of the mouse with that of the MC.
Ive also tried using a variable on the rollover and rollout
states to then tell the tooltip MC to lock to the mouse position but i cant seem to get this to work either.
eg.
on (rollOver,dragOver){
tellTarget (tooltip)(
over = true;
tooltip.gotoAndStop("show");
)
)
on(rollOut, dragOut){
tellTarget (tooltip) {
over = false;
tooltip.gotoAndStop("hide");
)
}
then on the tooltip MC:
onClipEvent (enterFrame){
if (over)
_x = _xmouse
_y = _ymouse
what am i doing wrong.....
anyone who could help me out with this one would be
a flash master in my eyes....
cheers..
View Replies !
View Related
StartDrag Syntax Help Plz
Hello all,
when a button is touched I need the mouse to hide and a movieclip(custom cursor) to take the mouses place, when you roll out the normal mouse comes back and the movie clip disapears. All that I have so far. What I need help on is this:
I also need to have the movieclip(custom cursor) only draggable by the x axis and not by the y. The _y position of the custom cursor needs to stay fixed at 150. My code looks like this in the button.
on (rollOver) {
// IF we go to portfolio or clients, mouse won't disapear
if (_root.page != "portfolio" || _root.page != "clients") {
Mouse.hide();
}
// swap cursors
startDrag("_root.quotecontrol.cursor",true);
_root.quotecontrol.cursor._visible = true;
// reveal quotes cursor
}
on (rollOut) {
// IF we go to portfolio or clients, mouse won't disapear
if (_root.page != "portfolio" || _root.page != "clients") {
Mouse.show();
}
// put sensor cursor back in placec(vital)
Mouse.show();
startDrag ("_root.sensor", true);
_root.quotecontrol.cursor._visible = false;
// hide quotes cursor
}
// end code
I think my dragging sytax is wrong,
startDrag("_root.quotecontrol.cursor",true);
I tried,
startDrag ("_root.quotecontrol.cursor", true, 3000, this._y, 3000, this._y);
but that didnt work. I tried setting the _y of the cursor with a looping movie clip but it makes the cursor clip blink or even disapear when you move the mouse.
can someone please help me out?
Thanks 102 times,
dev_flasher
View Replies !
View Related
StartDrag(); Differences
I have noticed 3 differences syntax for startDrag(); , So what is the difference if any between
startDrag("",true,0,0,600,400);
and
startDrag(true,0,0,600,400);
and
startDrag(this, true,0,0,600,400); ?
Thanks
View Replies !
View Related
Masking With Startdrag
I've got a startdrag command on a semi-transparent box which is masking a background. I need to know how to get a button to be active on the underneath layer.
Camaroon..........scooooooooooooooooore!!!!!!!!
View Replies !
View Related
Startdrag & Stopdrag.
Hi.
Is it possible to f.ex. set some kind of an border around a movie, so when the user drags a "window" it's not possible to drag the "window" outside of the movie ?
It could maybe be, with the help of actions scripts.. but I can't find either the method or propertie.. for this..
Can anyone please help me ?
I'm really looking forward to hear from you.
Best regards
Raz
View Replies !
View Related
StartDrag - Is There An Alternative To This?
Hi
I'm making a little "breakout" mini-game, been going fine with it nearly finished, but just stumbled across a problem:
my "paddle" that moves left and right, i'm using "startdrag" on it and it works great, but buttons don't respond to mouse overs etc when there's start drag active.
so I thought instead of "startdrag", i could just put this code on my "paddle" mc:
onClipEvent (enterFrame) {
this._x = _xmouse;
}
And then it would just follow my mouse like a "startdrag" would.
But when i do this the "paddle" goes crazy! doesn't make sense. I tried it on a brand new movie too (to make sure no other rogue code was interfereing with it) but still it acts very odd. It doesn't quite follow the mouse and the movement is very jerky, its all over the place!
can anyone help me out here? i'm sure there;s something simple i'm overlooking.
View Replies !
View Related
|