Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




How Do You Snap A Dragable MC To Screen?



Hey,

I’m just wondering if there’s a way to make a dragable move clip snap to a section on the screen when it gets within a certain number of pixels of it?

Cheers guys



FlashKit > Flash Help > Flash ActionScript
Posted on: 01-12-2004, 12:19 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Saving A Snap-shot Of The Screen
Hey everyone.

I am building a program that will send an image of the flash movie to a database using php. The database is set-up along with the php script to send it. However, the thing that I am really finding difficult is getting flash to take a snap-shot of the screen.

The flash movie allows the user to drag and drop items onto the stage as well as allow them to write text and draw (using a simple drawing API script). Therefore I am hoping that the user can customize their page, save it and then view it in a php database later on. The back-end system is in place. All i need is a piece of code that will allow flash to save out an image of itself (prefferably held in a variable). CAN IT BE DONE?!?!?

What format will it save it as? jpg or bmp would be best.

There must be a flash genius out there that knows how to do this and if they do, i owe them a pint BIG TIME

Hope to hear from you soon

Griff

Capture Snap-shot Of Screen To Use In Flash Presentation
Hello FLASH'ers friends!

I am wondering if anyone can point me in some direction for this project I am about undertake.  This is what I want to do:

Neatly capture snapshots of my screens.  These screens are templates or data entry screens for my Accounting application.

Take snapshots of screens and use them in FLASH to create CBT application.


Does anyone know of a program I can use to capture screens and create vector images and/or FLASH compatible images?

Thank you all in advance;


josel


If you have the knowledge, consult and educate those who need it! - Jose Lerebours

.........dragable.......?
hi all,
can anyone tell me how to make a movie clip dragable. i have tried it using the start drag action,it works when there is only one clip involved, but it does not seem to work when there are more clips within the main movie clip.
any suggestions on how to resolve this would be highly appreciated.

thanks in adv

HELP WITH DRAGABLE
Ok heres the dealio.. :P I have a dragable that I would like to be able to close after viewing. I want to place the close button inside the dragable, but I'm kinda new to this so, if anyone can help me or tell me a tutoral I could use to help me with this problem.

Thanx

? 2 Dragable Mc
If i duplicat a MC how do i tell my mous which one i whoul like to drage at that time.

Dragable MC
hi @ all

i'm new in this forum, and heres my first question.
I try to make a dragable movie clip. im using this skript.

onClipEvent(enterFrame){
startDrag(target)}

there are no errors, but i doesnt work.
im very new to flash too, i'm only working with it for 2 days.
hope someone can help me.

mfg dj-steve8

Help With Dragable MC's
What I'm trying to create is a movie clip that is draggable only from an upper, hovering "tab" of sorts. When you click the tab and drag, the mc comes along for the ride, but the mc wont drag when you click anywhere else on it. Man, I really hope that makes sense! I'm assuming it has somthing to do with a mc inside of another mc, but I'm pretty lost.

Thanks in advance!

Dave.

All Dragable Except One; Why?
i have a mc that is dragable; i also have a button that sends the playhead to frame 2 where it randomly duplicates the mc; when the duplication is performed, all the "clones" are dragable except one; why?
the mc code is:
----------------------------------------
onClipEvent (load) {
this._x = random(300);
this._y = random(300);
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.startDrag(false);
}
}
onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.stopDrag(false);
}
}
-------------------------------------------
the frame code is:
-------------------------------------------
amount = random(10);
trace(amount);
while(amount>0) {
duplicateMovieClip (ca, "ca"+i, i);//ca is the instance name of the mc
i = i + 1;
amount = amount-1;
}
-------------------------------------------

Snap To
Can anyone help me with a snap to. I am trying to get a movie to snap to a postion on the screen when it is dragged to within a certain distance from the position. what I am currently doing is

getting the x and y position of the positon
getting the x and y position of the movie

subtracting the smallest x position from the largest
subtracting the smallest y position from the largest

if the both positions are less than a specified distance then setting the x and y properties of the movie to that of the snap position.

Here is the code that I have written for the x position am I on the right track:

//snaplooper movie contains 2 loopng frames

//frame 1
set (c, getProperty(_root.a, _x));
set (d, getProperty(_root.b, _x));

//a is the movie, b is the position

//frame 2

if (c>d) {
f = (c-d);
} else {
f =(d-c);
}
if (f < 30) {
setProperty ("_root.a", _x, d);
}
gotoAndPlay (1);


Thanks

Snap
Hey, I've sort of just jumped into the deep end on a project. Hoping I'll learn to swim.

It's a self-help quiz with 2 draggable MC's sorta like marbles (one called "more" and one called "less"), and 4 holes to put the marbles in, depending on their answer. At this point, I'm just trying to get the marbles to snap back to original position if the user doesn't put it in a hole.

THE PART THAT WORKS OK:
I was able to make the marble MC's (each containing a smaller MC called "snap") snap to the holes using hittests-- I placed this script on each hole (with different y positions depending on which hole)

onClipEvent (enterFrame) {
if (this.hitTest(_root.less.snap)) {
setProperty ("_root.less", _x, "84");
setProperty ("_root.less", _y, "102");
} else if (this.hitTest(_root.more.snap)) {
setProperty ("_root.more", _x, "84");
setProperty ("_root.more", _y, "102");
play ();
}
}
That seems to work allright. The draggable MC's start acting weird when they snap to position, though. Like hard to pick back up, or you can pick it up, but the mouse is no longer actually touching marble. I tried adding
Start Drag ("drag", lockcenter), but it gave me an error saying it had to be true or false. I'm new to this, I'm a moron, I know. The error is probably obvious to you masters, but I'm clueless why it's not working.

THE PART I CAN'T GET TO WORK AT ALL: the snap back to original position.

I've tried several approaches, some based on other discussions I found by searching this board, but none seemed to work. So I decided to try writing my own, but I think there's some sort of syntax error, or logic flaw somewhere.

I added a very narrow box-like MC over the row of holes, and called it "testerbar". Then on draggable, I tried:

onClipEvent (mouseDown) {
startDrag ("");
}
onClipEvent (mouseUp) {
stopDrag ();
if (this._droptarget != _root.testerbar) {
setProperty ("this", _x, "366.8");
setProperty ("this", _y, "367.9");
}
}

Is this just WAY off track? Am I using the != in the wrong way?

***DEMO: The client wanted a prototype sorta demo to see how it could work (he didn't think flash could do this sorta thing! hahahaha), and I put one together assuming (HOPING) I'd be able to figure it out if I got the job. I got the job, so now I need to figure it out. Bad way to do it, I know, but you can view the demo at: http://www.apexdesign.tv/ali/


THANK YOU FOR ANY ADVICE


========================================Pointless Rambling=
ActionScript is exciting as hell! but I feel like I'm learning Japanese, and all I want to say is "Which way to the bathroom", but probably coming out as "How spoon is my fire dog?"

I've spent oodles of dough on AS books, but they must all be too basic. One doesn't even mention the _droptarget property, and the other just gives a tooltip size description of what it is. ARGH.

I'm sure I'll have more questions later, but right now I'd just like to figure out why I can't get this snap to work. But also, in the meantime, is there any other source for ActionScripting KNOW-HOW besides books and FlashKit tutes? Seems like I keep shelling out dough on books, just to find out it doesn't tell me what I want to know.
[Edited by Al Flashino on 08-11-2001 at 09:25 AM]

Help/Does Anybody Know How To Snap?
Having great difficulty trying to figure this one out. I have a series of cubes and a series of squares. The cubes are dragable and when any cube is dragged onto any of the squares I want it to snap into place on the square. If anyone can help me out with this one I'd appreciate it.

Snap
Okay, I want to snap my all of my duplicate clips of "circle" when dragged over the target. The targets are named target1, target2 and so on, and it goes on till target 15.

When snapped, I would like them to still be draggable. Can someone help me out with this task? I have posted some of the coding that I have, I just need to add the snap to target command. Any help would be greatly appreciated.



Code:
for (i=1; i<=totNum; i++) {
circle.duplicateMovieClip("circle"+i, i);
ref = this["circle"+i];
ref._x = 45;
ref._y = 130;
funName = "fun"+ref;
ref.onPress = function() {
startDrag(this, false, 0, 0, Stage.width, Stage.height);
};
ref.onRelease = function() {
stopDrag();
};
}

[Edited by wiReZ on 06-13-2002 at 05:51 PM]

Snap To Help
Hello,

My flashMX 2004 is giving me a headache. i turned on snap to, turned on the magnet, hell i even put it to tolerant! but it wont snap to lines! it only snaps to straight lines(as in up,down,left or right). This is only when i draw with straight lines. When i normally move a line side with my mouse (when its already drawn) it does snap to the other lines.

A little help here please.

Snap To
how can I make only selected draggable movie clips "snap to" a non-draggable movie clip? Can anyone help me out? thx.

Snap To X,Y
Hey -
i know its easy and that its out there - just can't seem to find it.
i need my movie clip to snap to the xy coordinates to keep the text sharp.
applied to this code:


Code:
onClipEvent (load) {
_x = 1280;
_y = 0;
speed = 5;
}
onClipEvent (mouseMove) {
endX = _root._xmouse;
endY = _root._ymouse;
}
onClipEvent (enterFrame) {
_x += (endX-_x)/speed;
_y += (endY-_y)/speed;
}
thanks!

Snap
Any niffy suggestion on creating a snap game?

I want the press button to detect the last button pressed and if the shapes match, make them do something...obviously.

I think I'm going at it the wrong way.

I need to stick a "triange" id into the button/mc then if compares that and then if there is a match works then... right?


Code:
if(zum>1 && zum<=3){

ab[cb] = i
cb=cb+
}
if(zum>3 &&zum<5){
ac[cc] = i
cc=cc+
}
if(zum>5 &&zum<7){
ad[cd] = i
cd=cd+
}
if(zum>7 &&zum<9){
ae[ce] = i
ce=ce+
}
if(zum>9 &&zum<11){
af[cf] = i
cf=cf+
}
if(zum>11 &&zum<13){
ag[cg] = i
cg=cg+
}
if(zum>13 &&zum<15){
ah[ch] = i
ch=ch+
}
if(zum>15 &&zum<17){
ai[ci] = i
ci=ci+
}
if(zum>17 &&zum<19){
aj[cj] = i
cj=cj+
}
if(zum>19 &&zum<21){
ak[ck] = i
ck=ck+
}
if(zum>21 &&zum<23){
al[cl] = i
cl=cl+
}

Dragable Mask
here's the situation: i have a picture bar which contains 6 different faces. i want each face to illuminate when the user mouses over it.
question is this ___ is it better to make each face a button or should i use a dragable mask technique?
in terms of development, it seems like the buttons would be easier to make, but take longer to make.
anyone have any good drag mask tutorials that AREN'T on Flashkit...? i've looked at the open source on the 4 or 5 of them here, but they're not making much sense. i mean, they make sense, but it's just not working for me. i'm having a real hard time getting the mask to follow the mouse precisely.. i can get it to work, but it's really jumpy and twitchy.
~thanks for the help~

Problem With Dragable MC
hi- I've created a dragable MC that works. However, the only problem is the button actions within the MC don't work anymore.(the close and open)Go here to see: http://turbine9.com/beta/
Here's what I have to control dragging:
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse,_root._ymouse,true)){
this.startDrag(true,0,0,753,460);
}
}
onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse,_root._ymouse,true)){
this.stopDrag();
}
}

Inside the MC I have 2 simple buttons to jump to 2 labels..i.e.:
on (release) {
gotoAndPlay("close");
}
this is probably something really simple...thanks in advance for any help...allison

Dragable Menu
hi buddies, I want to build a dragable MENU. Please help me and tell me how I can built it.
Thanks

Dragable Window
I have a semi-transparent dragable window on the top frame of my scene. However, this flash movie has a total of 7 scenes; and the dragable window is currently only on the first scene.

The dragable window has of course, links to the other scenes. Is there a way to continue the dragable window seamlessly through all scenes without and movement?

Thanks...

Dragable Windows - Help Please.
As this is my first ever post on this board, Id like to say Hello to everyone.

What I am wanting to do is be able to have multiple dragable windows on the screen at any one time in my movie. I have followed this tutorial (Here) and have successfully created the windows, I just want to be able to have multiple windows open at a time.

Is this possible? Is it hard to achieve?

Any help regarding this would be greatly appreciated.

Thanks very much for your time,

Peace,
Drewe.

Dragable Output Box
Hi all,

'have the following problem: I'm trying to make an output box which is draggable with the mouse in vertical direction only (within certain
upper and lower limit).

Dependend on the vertical position it should make a calculation.
So if the _y position = 100 it should output i.e. 100 * variable
and after dragging the output box to _y position 110 it should output 110 * variable.

Hope you know what I mean. In this link I put my newbies unsuccesful attempt:

http://home.hccnet.nl/m.dijk/drag/

Expert help is highly appreciated !

Dragable Selection Box
Hi

I am a programmer who is new to Flash, but working with a graphic designer who has basic Flash skills.

We are trying to make a dragable selection area in flash5, mouse down defines the start point, as the user drags the mouse a selection box extends from the starting point to the current mouse position. on mouse up I need to have the x,y of the start point and the x,y of the end point.

Can anyone please help us?

Nick

Dragable Selection Box
Hi

My previous posting (please read the posting below first) did not bring any response, so let me narrow it down.

I can get the x,y positions of the mouse when the drag starts(start position) and also get the mouse positions as the mouse is dragged (current position). When the mouse is released I can get the mouse positions again (end position).

I will use start - end positions to pass on to further programming, but as the mouse is being dragged I want a box to be drawn (start to current positions)

So what I need to find out is, can I draw a box on screen dynamically, starting at the start position and ending at the current position. This will be constantly updated by the mouse move event.

Any help would be appreciated

Nick

(previous posting)
Hi

I am a programmer who is new to Flash, but working with a graphic designer who has basic Flash skills.

We are trying to make a dragable selection area in flash5, mouse down defines the start point, as the user drags the mouse a selection box extends from the starting point to the current mouse position. on mouse up I need to have the x,y of the start point and the x,y of the end point.

Can anyone please help us?

Nick

Dragable Selection Box
Hi

My previous posting (please read the posting below first) did not bring any response, so let me narrow it down.

I can get the x,y positions of the mouse when the drag starts(start position) and also get the mouse positions as the mouse is dragged (current position). When the mouse is released I can get the mouse positions again (end position).

I will use start - end positions to pass on to further programming, but as the mouse is being dragged I want a box to be drawn (start to current positions)

So what I need to find out is, can I draw a box on screen dynamically, starting at the start position and ending at the current position. This will be constantly updated by the mouse move event.

Any help would be appreciated

Nick

(previous posting)
Hi

I am a programmer who is new to Flash, but working with a graphic designer who has basic Flash skills.

We are trying to make a dragable selection area in flash5, mouse down defines the start point, as the user drags the mouse a selection box extends from the starting point to the current mouse position. on mouse up I need to have the x,y of the start point and the x,y of the end point.

Can anyone please help us?

Nick

Dragable Clip - Possible?
Can any body direct me to a tutorial for creating a dragable movie clip? Also is it possible to load a MC directly from the Libraray? In other words I am hoping to have my movie stop an one keyframe in my movie with a series of buttons - each button must open this dragable clip - but am hoping it can do this directly from library? Possible...or any suggestions will do....
thx,
A...

Using A Dragable M/c As A Mask?
Hi,

I have a movieclip which contains nothing but a simple vector shape. I have that following the mouse using startDrag as shown below:


Code:
startDrag("dragmask", true);


The movie clip drags ok, but what i want is the movie clip to mask the image on the layer below it. When i set it to mask, the drag function stops working

Is there another method to achieve this? or is there something i can do to fix the method above?

Any help would be greatly apreciated,
Ritchie

Dragable Mask
Hi all!
Here's what I'm trying to do: I have an immage, which I'd like to be half transparent and when I drag the mask it should show the normal immage (while the other parts still half transparent). The mask should follow the _ymouse and the draging should stop once I leave the MC area.
How do I do that?
Thanx in advance!

Dragable Mc Problems
i have a selection of mc on the stage i would like them to be dragged into an 'arena'. the problem is that i want the mc's to be copy and pasted so that there always mc's to be dragged over.

Dragable Movies
For a website I am doing, I am using a dragable movie as a menu bar of sorts. By using the OnClipEvent, I've gotten the buttons and dragging function to work at the same time, however, I can't seem to get two of the dragable menus to work simultaneously. Either the buttons within the menu stop functioning, or I am only able to drag one menu at a time. I tried loading the second menu in a separate movie, but that also seemed seemed not to work. Any help would be much appreciated! Thanks!

Dragable Movies...help
For a website I am doing, I am using a dragable movie as a menu bar of sorts. By using the OnClipEvent, I've gotten the buttons within the movie and dragging function to work at the same time, however, I can't seem to get two of the dragable menus to work simultaneously. Either the buttons within the menu stop functioning, or I am only able to drag one menu at a time. I tried loading the second menu in a separate movie, but that also seemed seemed not to work. Any help would be much appreciated! Thanks!

Dragable Menu Help Please
I am trying to do the following:

I created a menu in bitmap and inported it into Flash as a movie clip, I have a drag button and a minimize button on the menu... I am working on the drag button at the moment. In the menu movie clip I created a transparent block over the drag button, and turned the symbol into a button.

Here is my problem, I cannot apply the required action script to the button:

on (press) {
startDrag ("/menu");
}
on (release) {
stopDrag ();
}

The window says "Current selection cannot have actionscript applied to it." When I tried to apply the script to the symbol from the movie clip menu (with the button selected), Flash returns with the error that on (press) even can only be applied to buttons...

Where or how should I apply the code? I have been digging around for hours with no luck, any help will be greatly appreciated!

Dragable Menu
I want to create a dragable navigation menu for my website. I can make a menu drag, but I can't get any buttons to work inside the menu.

For the Drag function of the menu my code is:

on(press)
{
this.startDrag();
}

on(release)
{
this.stopDrag();
}

The buttons are placed inside of the menu, but I'm open to changing it if it'll work. It seems like it should be possible, but I can't figure out how to make it work.

Mc Point To Dragable Mc?
ok, this is confusing me. i have a dragable mc (dragMC) limited to up and down, with this script...
code:

on (press){
startDrag(this,false,500,0,500,400);
}
on (release, releaseOutside){
stopDrag();
}


and another mc (pointMC) as a pointer, with this script...

code:
onClipEvent(mouseMove){
_rotation = _root.dragMC._y / Stage.height * 180;
}


the problem is that the pointer (pointMC) doesnt point to the draging mc (dragMC). i need it to point to the center of the other mc. i dont know how to script this. can anybody help?

Dragable Layer
Hello,
I have content shown in a square. But I want to make it dragable so user can drag and drop it wherever it is convenient.
Can somebody advice how to do that? Thank you.

Dragable MC - That Shouldn't Be
Hello all,

Well, I have a movie clip with an "onClipEvent (enterFrame) {" script on it, the function of the script is to govern the movement of the clip. By and large I have got the script working well. You can see it in action here. Please navigate to "animation > 3d me two" on the menu. The movie I'm talking about is the scrolling images of 3d models.

The problem is... when you click on the image and drag it - it moves - even when the cursor is outside the area of the image and even though it is not a button and even though I havn't coded it to be dragable !!??

Hmm curiouser and curiouser. Can anyone enlighten me as to why this may be? The scroll code is this:

Code:
onClipEvent (enterFrame) {
if (_root.posRight == "yes"){
if (_root.mainVar == 60) {
homeX = (-_root._xmouse)+270;
} else {
homeX = (-_root.mainVar)+270;
}
thisX = _x;
diffX = homeX-thisX;
if (_root.mainVar == 60) {
moveX = diffX/30;
} else {
moveX = diffX/5;
}
_x = thisX+moveX+8;
} else {
if (_root.posRight == "no"){
homeX = (-_root.mainVar)+270;
thisX = _x;
diffX = homeX-thisX;
if (_root.mainVar == 60) {
moveX = diffX/30;
} else {
moveX = diffX/5;
}
_x = thisX+moveX;
}
}
}
(I'm sure that this code is very messy and full of artifacts/redundant stuff but even the original had this glitch)

Thank you for looking, I appreciate the help (btw - even if you cant solve this but have an idea as to why it may be please post and point me in the right direction - thanks!)

*ah.. just had an idea... is there a way to disable "clickability" while the mouse is in a certain area or over a certain object? Thanks!

[f8] Dragable Windows
Hi Dudies and Gals,

: )

I am looking for some information in who to build (in flash) something like it: http://www.google.com/ig

I mean... you have panels and panels can be positioned in others places...

If someone knows a tutorial about this, please... give me a light.

Thanks in advanced for any info.

Please Help Moving MC And Dragable
I am trying to make a movable MC also be dragable. I can make the MC move back and forth (yea) and make it dragable (sort of). The problem is that the MC continues to move and it all goes to hell after that.

I am using Flash 8 and my code is below:

onClipEvent (load) {
speedx = 5;
}
onClipEvent (enterFrame) {
this._x += speedx;
if (this._x>=800) {
speedx = -speedx;
} else if (this._x<=10) {
speedx = -speedx;
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
speedx = -speedx;
speedx = -speedx;
}
}
onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.stopDrag();
if (_parent.centerCircle.hitTest(this._x, this._y, true)) {
_root.gotoAndStop(2);
}
}
}

Any help is greatly appreciated!

Regards,
Pat

Dragable Movieclips
im working on a document explorer with dragable windows im using the code below to load movieclips into a movieclip called explorer


Code:
on (release) {
_root.Explorer.attachMovie("Computer", "Computer", 10);
}
The problem is when i click on a button which uses that code to load another dragable movieclip into the empty movieclip explorer its position isnt retained it goes back to explorers position at 0,0

IS theyre any way of getting this to work maby by specifing explorers position = the position of the window movieclip or by getting the titlebar vutton (which is the dragger) to drag explorer rather than the window movieclip ?

Heres the drag code im using
Code:
on (press) {
startDrag(this);
}
on (release) {
stopDrag();
}
Thanks

Dragable Distances
I would be greatful to anyone who could help me - thanks in advance :

This was done in flash 5.

What i would like to do is modify the *fla i have attatched so that i can move the fishMC away from another MC (say a fish bowl thats gonna be his home), and display the distances.....but i would also like to be able to move his home around.

So there would be 3 variables :

1) Where the homeMC is

2) where the fishMC is

4) _x and _y distacnes/postions

Thanks again for any help

regards, snapple

Duplicate Over And Over Plus Dragable
I've found duplicate code on here but everytime I click on the button the first duplicate disappears and new one appears. I want one to repeat and leave the one before where it is and have the duplicates dragable. If anyone knows how to do what I'm talking about let me know. Also if possible let me know how to reverse/remove duplicates in order. Thanks!

Dragable Mask Help
Can someone point me in the direction of creating this type of draggable mask:
http://www.flashlight.hpg.ig.com.br/photos/pfx1_1i.htm

I know how to make a mask, and how to create a mask with actionscript that moves over an image but how would I create the bar (vertical) that can be dragged over the image(s) to create the mask?

I've tried the magnifying glass tutorial but I can't get the vertical bar to be the mask and draggable.

rberry88

Dragable Windows?
Hi there... i am making a new flash-site...
I wonder how i can make a window (mc) within flash dragable?
i named the mc i want to be dragable "menu"...
I want it to be like in microsoft windows, so the hit area is only on the top (usually the blue area on the window )

please help me someone!!

Dragable Menu
i hav found a tutorial about dragable on ur site and i played w/ it for while, however, when i tried to make it go vertical instead of horizontal it doesnt work any more...

heres the code, can any1 explain to me whats wrong w/ it?

actionscripts under dragger, <drag>
onClipEvent (load) {
_y = _root.box._y-_root.box._height/2+_height/2 ;
_x = _root.box._x ;
yold = _y ;
}
onClipEvent (enterFrame) {
if (dragging) {
if((_root._ymouse>_root.box._y-_root.box._height/2) and (_root._ymouse<_root.box._y+_root.box._height/2)) {
_y = _root._ymouse ;
dydrag = _y - yold ;
}
}
}

action script under clipgeneral, <general>
onClipEvent (load) {
_x = _root.pos._x ;
_y = _root.pos._y -_root.pos._height/2+_height/2 ;
positiongeneral = _y ;
}
onClipEvent (enterFrame) {
dest = positiongeneral - _root.drag.ratio*_root.drag.dydrag ;
pos = this._y ;
this._y += (dest - pos) /7 ;
}

thx

Dragable Buttons
building a website, and the menu consists of square buttons that can be dragged and dropped individually. There are ten of these. The dragging&dropping part already works (check www.finditboys.tk), but what i want to do is have the buttons perform actions (open different pages etc) when you double click them. Now i guess i will have to add some sort of counter loop to the script i already have, and the counter should check if there is a second click within a certain amount of time. But... how do i do this? Or is there an easier way to check for double clicks?

The buttons aren't actually buttons by the way, they are movie clips, and they all have the following action script:

on (release) {
stopDrag();
}
on (press) {
startDrag(this);
mx.behaviors.DepthControl.bringToFront(this);
}

can someone help me on this one? thanks!

Dragable Menu2
Hello...

I found this cool menu-system-tutorial on Kirupa (http://www.kirupa.com/developer/flash5/menudragger2.htm) ... I can't make it vertical instead of horizontal.... Can anyone help me??

Kenneth

Canīt Get My Clip Dragable
Hello!
I have an empty movieclip (the clip) with some lines drawn in it.
I got help from stringy with getting my clip dragable.

Now I have added some code and the clip isnīt dragable anymore. I have tried moving round the code and changeing it, but canīt get it dragable,
I also have problems with my button "selutn", the clip doesnīt get alpha=0 when the button is clicked.
If someone here has time to look at my fla I would be very greatful.

Dragable Movieclip On Top
Hey! I'm playing around with dragable movieclips and that part works fine. What I can't get working is getting a movieclip to be on top the rest when I start draging it. I Tried with this.getNextHighestDepth but couldn't get it working. Hope you can come up with a solution for me.

-Sumper

Dragable Mc Or Buttons
Hi everyone,

I have some images in a flash movie I would like to be dragable. Can someone give me a step by step of how this is done. Please

I understand it's quite simple in Flash MX — I'll need to upgrade one day.


/s

Copyright Đ 2005-08 www.BigResource.com, All rights reserved