From: Jesse V. <je...@6t...> - 2003-02-12 17:51:46
|
I have a 2 layers, and when one moves, I want the other one to move, so they move as a group. Shouldn't be hard to do, but I don't know how to tell how far the first layer has moved, that way my move callback can move the other one by the same distance. Is there something that I can look at when I'm in the ondragmove listener to see how far it's moved? Thanks in advance, Jesse |
From: Raymond I. <xw...@ya...> - 2003-02-12 18:44:55
|
What version of dynapi are you using? This situation will be addressed with 3.0. It uses a layer motion/collision detection library that can be used for exactly what you want it to. -- Raymond Irving --- Jesse Vitrone <je...@6t...> wrote: > I have a 2 layers, and when one moves, I want the > other one to move, so > they move as a group. > Shouldn't be hard to do, but I don't know how to > tell how far the first > layer has moved, that way > my move callback can move the other one by the same > distance. > > > Is there something that I can look at when I'm in > the ondragmove > listener to see how far it's moved? > > Thanks in advance, > Jesse > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = > Something 2 See! > http://www.vasoftware.com > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help __________________________________________________ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com |
From: Jesse V. <je...@6t...> - 2003-02-13 02:16:22
|
I'm using 2.9. Is there a good way to do it with this? When is 3.0 supposed to be coming out? Thanks, Jesse Raymond Irving wrote: >What version of dynapi are you using? > >This situation will be addressed with 3.0. It uses a >layer motion/collision detection library that can be >used for exactly what you want it to. > >-- >Raymond Irving > >--- Jesse Vitrone <je...@6t...> wrote: > > >>I have a 2 layers, and when one moves, I want the >>other one to move, so >>they move as a group. >>Shouldn't be hard to do, but I don't know how to >>tell how far the first >>layer has moved, that way >>my move callback can move the other one by the same >>distance. >> >> >>Is there something that I can look at when I'm in >>the ondragmove >>listener to see how far it's moved? >> >>Thanks in advance, >> Jesse >> >> >> >> >> >> >------------------------------------------------------- > > >>This SF.NET email is sponsored by: >>SourceForge Enterprise Edition + IBM + LinuxWorld = >>Something 2 See! >>http://www.vasoftware.com >>_______________________________________________ >>Dynapi-Help mailing list >>Dyn...@li... >> >> >> >https://lists.sourceforge.net/lists/listinfo/dynapi-help > > >__________________________________________________ >Do you Yahoo!? >Yahoo! Shopping - Send Flowers for Valentine's Day >http://shopping.yahoo.com > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >Dynapi-Help mailing list >Dyn...@li... >https://lists.sourceforge.net/lists/listinfo/dynapi-help > > |
From: Raymond I. <xw...@ya...> - 2003-02-13 04:41:00
|
Hello Jesse, DynAPI 2.9+ uses setLocation(x,y) instead of moveTo() and moveBy() has been removed. The feature that you're looking for is often times left up to users' implementation. DynAPI only provides the core methods and properties inside the distro. What I would suggest is that you make an extension for the DynLayer object. In so doing users who need this feature can include the extension. Agree? If you need help with creating the extension. Then let me know. Best regards, -- Raymond Irving --- Jesse Vitrone <je...@6t...> wrote: > I'm using 2.9. Is there a good way to do it with > this? When is 3.0 > supposed to be coming out? > > Thanks, > Jesse > > Raymond Irving wrote: > > >What version of dynapi are you using? > > > >This situation will be addressed with 3.0. It uses > a > >layer motion/collision detection library that can > be > >used for exactly what you want it to. > > > >-- > >Raymond Irving > > > >--- Jesse Vitrone <je...@6t...> > wrote: > > > > > >>I have a 2 layers, and when one moves, I want the > >>other one to move, so > >>they move as a group. > >>Shouldn't be hard to do, but I don't know how to > >>tell how far the first > >>layer has moved, that way > >>my move callback can move the other one by the > same > >>distance. > >> > >> > >>Is there something that I can look at when I'm in > >>the ondragmove > >>listener to see how far it's moved? > >> > >>Thanks in advance, > >> Jesse > >> > >> > >> > >> > >> > >> > >------------------------------------------------------- > > > > > >>This SF.NET email is sponsored by: > >>SourceForge Enterprise Edition + IBM + LinuxWorld > = > >>Something 2 See! > >>http://www.vasoftware.com > >>_______________________________________________ > >>Dynapi-Help mailing list > >>Dyn...@li... > >> > >> > >> > >https://lists.sourceforge.net/lists/listinfo/dynapi-help > > > > > >__________________________________________________ > >Do you Yahoo!? > >Yahoo! Shopping - Send Flowers for Valentine's Day > >http://shopping.yahoo.com > > > > > >------------------------------------------------------- > >This sf.net email is sponsored by:ThinkGeek > >Welcome to geek heaven. > >http://thinkgeek.com/sf > >_______________________________________________ > >Dynapi-Help mailing list > >Dyn...@li... > >https://lists.sourceforge.net/lists/listinfo/dynapi-help > > > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help __________________________________________________ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com |
From: Doug M. <do...@cr...> - 2003-02-13 05:09:03
|
anyways.. On mousedown on the master layer record the x and y to variables. This will get you the starting location of the layer. On dragmove (or whatever) do your math using the current x and y versus the starting x and y. This will move the second layer appropriately. You _may_ need to record the starting x and y of the second layer as well.. little drunk and head a little fuzzy. |
From: Jesse V. <je...@6t...> - 2003-02-13 15:56:59
|
OK, thanks, then I'll just handle it myself, which seem like what the other other people replying are doing. Thanks, Jesse Raymond Irving wrote: >Hello Jesse, > >DynAPI 2.9+ uses setLocation(x,y) instead of moveTo() >and moveBy() has been removed. > >The feature that you're looking for is often times >left up to users' implementation. DynAPI only provides >the core methods and properties inside the distro. >What I would suggest is that you make an extension for >the DynLayer object. In so doing users who need this >feature can include the extension. Agree? > >If you need help with creating the extension. Then let >me know. > >Best regards, > >-- >Raymond Irving > >--- Jesse Vitrone <je...@6t...> wrote: > > >>I'm using 2.9. Is there a good way to do it with >>this? When is 3.0 >>supposed to be coming out? >> >>Thanks, >> Jesse >> >>Raymond Irving wrote: >> >> >> >>>What version of dynapi are you using? >>> >>>This situation will be addressed with 3.0. It uses >>> >>> >>a >> >> >>>layer motion/collision detection library that can >>> >>> >>be >> >> >>>used for exactly what you want it to. >>> >>>-- >>>Raymond Irving >>> >>>--- Jesse Vitrone <je...@6t...> >>> >>> >>wrote: >> >> >>> >>> >>> >>> >>>>I have a 2 layers, and when one moves, I want the >>>>other one to move, so >>>>they move as a group. >>>>Shouldn't be hard to do, but I don't know how to >>>>tell how far the first >>>>layer has moved, that way >>>>my move callback can move the other one by the >>>> >>>> >>same >> >> >>>>distance. >>>> >>>> >>>>Is there something that I can look at when I'm in >>>>the ondragmove >>>>listener to see how far it's moved? >>>> >>>>Thanks in advance, >>>> Jesse >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>------------------------------------------------------- >> >> >>> >>> >>> >>> >>>>This SF.NET email is sponsored by: >>>>SourceForge Enterprise Edition + IBM + LinuxWorld >>>> >>>> >>= >> >> >>>>Something 2 See! >>>>http://www.vasoftware.com >>>>_______________________________________________ >>>>Dynapi-Help mailing list >>>>Dyn...@li... >>>> >>>> >>>> >>>> >>>> >>https://lists.sourceforge.net/lists/listinfo/dynapi-help >> >> >>>__________________________________________________ >>>Do you Yahoo!? >>>Yahoo! Shopping - Send Flowers for Valentine's Day >>>http://shopping.yahoo.com >>> >>> >>> >>> >>------------------------------------------------------- >> >> >>>This sf.net email is sponsored by:ThinkGeek >>>Welcome to geek heaven. >>>http://thinkgeek.com/sf >>>_______________________________________________ >>>Dynapi-Help mailing list >>>Dyn...@li... >>> >>> >>https://lists.sourceforge.net/lists/listinfo/dynapi-help >> >> >>> >>> >>> >>> >> >> >> >> >------------------------------------------------------- > > >>This sf.net email is sponsored by:ThinkGeek >>Welcome to geek heaven. >>http://thinkgeek.com/sf >>_______________________________________________ >>Dynapi-Help mailing list >>Dyn...@li... >> >> >> >https://lists.sourceforge.net/lists/listinfo/dynapi-help > > >__________________________________________________ >Do you Yahoo!? >Yahoo! Shopping - Send Flowers for Valentine's Day >http://shopping.yahoo.com > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >Dynapi-Help mailing list >Dyn...@li... >https://lists.sourceforge.net/lists/listinfo/dynapi-help > > ################################################################# ################################################################# ################################################################# ##### ##### ##### ################################################################# ################################################################# ################################################################# |
From: Lars V. N. <LV...@gi...> - 2003-02-12 20:10:04
|
Hi Jesse, I'm using DynAPI 2 to drag a layer with the mouse. First I used to extract the coords from the event variable (e.g. in onDragEnd), but that (obviously) stayed constant since it was relative to the moved layer. But testing the "top" and "left" style attributes for the layer worked, it'll give you the amount moved. Utilize that in onDragMove/onDragEnd to move your other layer and you should be set. Best regards/Med venlig hilsen Lars V. Nielsen ----- Original Message ----- From: "Jesse Vitrone" <je...@6t...> To: <dyn...@li...> Sent: Wednesday, February 12, 2003 6:51 PM Subject: [Dynapi-Help] how far did the layer move? > I have a 2 layers, and when one moves, I want the other one to move, so > they move as a group. > Shouldn't be hard to do, but I don't know how to tell how far the first > layer has moved, that way > my move callback can move the other one by the same distance. > > > Is there something that I can look at when I'm in the ondragmove > listener to see how far it's moved? > > Thanks in advance, > Jesse > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > http://www.vasoftware.com > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help > |
From: Glen D. <gle...@gt...> - 2003-02-13 01:02:57
|
I don't know if this is what you are looking for, but here it comes. COLHevents=new EventListener(COLH) COLHevents.ondragmove=function(e) { COLB.moveTo(COLH.x, COLH.y-1) COL.moveTo(COLH.x, COLH.y) } COLH.addEventListener(COLHevents) An old example using dynapi 2.53 is here: (Warning, adult cartoons) http://home1.gte.net/glendeas/dynapi253/tsusaka/set0.html The code is here: http://home1.gte.net/glendeas/dynapi253/tsusaka/set0.js ----- Original Message ----- From: "Jesse Vitrone" <je...@6t...> To: <dyn...@li...> Sent: Wednesday, February 12, 2003 12:51 PM Subject: [Dynapi-Help] how far did the layer move? > I have a 2 layers, and when one moves, I want the other one to move, so > they move as a group. > Shouldn't be hard to do, but I don't know how to tell how far the first > layer has moved, that way > my move callback can move the other one by the same distance. > > > Is there something that I can look at when I'm in the ondragmove > listener to see how far it's moved? > > Thanks in advance, > Jesse > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > http://www.vasoftware.com > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help |
From: Jesse V. <je...@6t...> - 2003-02-13 02:12:38
|
Glen & Lars: I'm not sure I was quite clear on what I really want to do. Let's say I have layer1 at x / y = 100 / 200 and layer2 at x / y = 200 / 400. When layer1 gets moved to 110 / 220, I need to move layer2 to 210 / 420. Is there an easy way to do this? I don't want to use moveTo, since the x / y coords of the two layers aren't the same. I need to find out how much layer1 moved in the x / y directions, then pass them to moveBy. I could always keep track of the "previousX/Y" manually, then see where it is after it gets moved, but it seems like this would be a common thing that people would need and that I wouldn't have to do it manually. Thanks for the suggestions though. Jesse Glen Deas wrote: >I don't know if this is what you are looking for, but here it comes. > > COLHevents=new EventListener(COLH) > COLHevents.ondragmove=function(e) { > COLB.moveTo(COLH.x, COLH.y-1) > COL.moveTo(COLH.x, COLH.y) > } > COLH.addEventListener(COLHevents) > >An old example using dynapi 2.53 is here: (Warning, adult cartoons) >http://home1.gte.net/glendeas/dynapi253/tsusaka/set0.html > >The code is here: >http://home1.gte.net/glendeas/dynapi253/tsusaka/set0.js > > >----- Original Message ----- >From: "Jesse Vitrone" <je...@6t...> >To: <dyn...@li...> >Sent: Wednesday, February 12, 2003 12:51 PM >Subject: [Dynapi-Help] how far did the layer move? > > > > >>I have a 2 layers, and when one moves, I want the other one to move, so >>they move as a group. >>Shouldn't be hard to do, but I don't know how to tell how far the first >>layer has moved, that way >>my move callback can move the other one by the same distance. >> >> >>Is there something that I can look at when I'm in the ondragmove >>listener to see how far it's moved? >> >>Thanks in advance, >> Jesse >> >> >> >>------------------------------------------------------- >>This SF.NET email is sponsored by: >>SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! >>http://www.vasoftware.com >>_______________________________________________ >>Dynapi-Help mailing list >>Dyn...@li... >>https://lists.sourceforge.net/lists/listinfo/dynapi-help >> >> |
From: Glen D. <gle...@gt...> - 2003-02-13 07:06:16
|
Or my example was muddy. check x+100 and y+200 layer1events=new EventListener() layer1events.ondragmove=function() { layer2.moveTo(layer1.x+100, layer1.y+200) } layer1.addEventListener(layer1events) Working example: http://home1.gte.net/glendeas/jesse/dragginganotherlayer.html glen ----- Original Message ----- From: "Jesse Vitrone" <je...@6t...> To: "Glen Deas" <gle...@gt...> Cc: <dyn...@li...>; <LV...@gi...> Sent: Wednesday, February 12, 2003 9:12 PM Subject: Re: [Dynapi-Help] how far did the layer move? > Glen & Lars: > I'm not sure I was quite clear on what I really want to do. > > Let's say I have layer1 at x / y = 100 / 200 and layer2 at x / y = 200 / > 400. > When layer1 gets moved to 110 / 220, I need to move layer2 to 210 / 420. > > Is there an easy way to do this? I don't want to use moveTo, since the > x / y coords of the two layers aren't the same. I need to find out how > much layer1 moved in the x / y directions, then pass them to moveBy. > > I could always keep track of the "previousX/Y" manually, then see where > it is after it gets moved, but it seems like this would be a common > thing that people would need and that I wouldn't have to do it manually. > > Thanks for the suggestions though. > > Jesse > > > Glen Deas wrote: > > >I don't know if this is what you are looking for, but here it comes. > > > > COLHevents=new EventListener(COLH) > > COLHevents.ondragmove=function(e) { > > COLB.moveTo(COLH.x, COLH.y-1) > > COL.moveTo(COLH.x, COLH.y) > > } > > COLH.addEventListener(COLHevents) > > > >An old example using dynapi 2.53 is here: (Warning, adult cartoons) > >http://home1.gte.net/glendeas/dynapi253/tsusaka/set0.html > > > >The code is here: > >http://home1.gte.net/glendeas/dynapi253/tsusaka/set0.js > > > > > >----- Original Message ----- > >From: "Jesse Vitrone" <je...@6t...> > >To: <dyn...@li...> > >Sent: Wednesday, February 12, 2003 12:51 PM > >Subject: [Dynapi-Help] how far did the layer move? > > > > > > > > > >>I have a 2 layers, and when one moves, I want the other one to move, so > >>they move as a group. > >>Shouldn't be hard to do, but I don't know how to tell how far the first > >>layer has moved, that way > >>my move callback can move the other one by the same distance. > >> > >> > >>Is there something that I can look at when I'm in the ondragmove > >>listener to see how far it's moved? > >> > >>Thanks in advance, > >> Jesse > >> > >> > >> > >>------------------------------------------------------- > >>This SF.NET email is sponsored by: > >>SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > >>http://www.vasoftware.com > >>_______________________________________________ > >>Dynapi-Help mailing list > >>Dyn...@li... > >>https://lists.sourceforge.net/lists/listinfo/dynapi-help > >> > >> > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help |
From: Doug M. <do...@cr...> - 2003-02-13 07:31:18
|
or that.. if you know the offset.. (doh) ----- Original Message ----- From: "Glen Deas" <gle...@gt...> To: "Jesse Vitrone" <je...@6t...> Cc: <dyn...@li...>; <LV...@gi...> Sent: Wednesday, February 12, 2003 5:44 PM Subject: Re: [Dynapi-Help] how far did the layer move? > Or my example was muddy. > check x+100 and y+200 > > layer1events=new EventListener() > layer1events.ondragmove=function() { > layer2.moveTo(layer1.x+100, layer1.y+200) > } > layer1.addEventListener(layer1events) > > Working example: > http://home1.gte.net/glendeas/jesse/dragginganotherlayer.html > > glen > > ----- Original Message ----- > From: "Jesse Vitrone" <je...@6t...> > To: "Glen Deas" <gle...@gt...> > Cc: <dyn...@li...>; <LV...@gi...> > Sent: Wednesday, February 12, 2003 9:12 PM > Subject: Re: [Dynapi-Help] how far did the layer move? > > > > Glen & Lars: > > I'm not sure I was quite clear on what I really want to do. > > > > Let's say I have layer1 at x / y = 100 / 200 and layer2 at x / y = 200 / > > 400. > > When layer1 gets moved to 110 / 220, I need to move layer2 to 210 / 420. > > > > Is there an easy way to do this? I don't want to use moveTo, since the > > x / y coords of the two layers aren't the same. I need to find out how > > much layer1 moved in the x / y directions, then pass them to moveBy. > > > > I could always keep track of the "previousX/Y" manually, then see where > > it is after it gets moved, but it seems like this would be a common > > thing that people would need and that I wouldn't have to do it manually. > > > > Thanks for the suggestions though. > > > > Jesse > > > > > > Glen Deas wrote: > > > > >I don't know if this is what you are looking for, but here it comes. > > > > > > COLHevents=new EventListener(COLH) > > > COLHevents.ondragmove=function(e) { > > > COLB.moveTo(COLH.x, COLH.y-1) > > > COL.moveTo(COLH.x, COLH.y) > > > } > > > COLH.addEventListener(COLHevents) > > > > > >An old example using dynapi 2.53 is here: (Warning, adult cartoons) > > >http://home1.gte.net/glendeas/dynapi253/tsusaka/set0.html > > > > > >The code is here: > > >http://home1.gte.net/glendeas/dynapi253/tsusaka/set0.js > > > > > > > > >----- Original Message ----- > > >From: "Jesse Vitrone" <je...@6t...> > > >To: <dyn...@li...> > > >Sent: Wednesday, February 12, 2003 12:51 PM > > >Subject: [Dynapi-Help] how far did the layer move? > > > > > > > > > > > > > > >>I have a 2 layers, and when one moves, I want the other one to move, so > > >>they move as a group. > > >>Shouldn't be hard to do, but I don't know how to tell how far the first > > >>layer has moved, that way > > >>my move callback can move the other one by the same distance. > > >> > > >> > > >>Is there something that I can look at when I'm in the ondragmove > > >>listener to see how far it's moved? > > >> > > >>Thanks in advance, > > >> Jesse > > >> > > >> > > >> > > >>------------------------------------------------------- > > >>This SF.NET email is sponsored by: > > >>SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > > >>http://www.vasoftware.com > > >>_______________________________________________ > > >>Dynapi-Help mailing list > > >>Dyn...@li... > > >>https://lists.sourceforge.net/lists/listinfo/dynapi-help > > >> > > >> > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Dynapi-Help mailing list > > Dyn...@li... > > https://lists.sourceforge.net/lists/listinfo/dynapi-help > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help > |