You are on the right path with the mask ink. I'll try to explain how you
should do it, it's pretty simple, you just have to reverse the way you
are thinking about the mask...it's not the mask you should move it's the
map.
You need to change the "regpoint" of the map...so the mask box will act
as a window through which you see the map.

1. make a black square in the cast that will be the size of the map you
want to "see" on the stage. 

2. import the map image in the cast slot next to the black square and
give it a name like "map", it must be bigger than the black square
itself

3. put the black square on the stage

4. to animate the map use the code: member("map").regpoint =
point(somethingX,somethingY)

So if you want to move:

--left
currentPoint = member("map").regpoint
member("map").regpoint = point(currentPoint[1]-1 , currentPoint[2])

--right
currentPoint = member("map").regpoint
member("map").regpoint = point(currentPoint[1]+1 , currentPoint[2])

--up
currentPoint = member("map").regpoint
member("map").regpoint = point(currentPoint[1] , currentPoint[2]-1)

--down
currentPoint = member("map").regpoint
member("map").regpoint = point(currentPoint[1] , currentPoint[2]+1)

Finally, you must check if the regpoint is within the boundaries of the
map itself, so that:
1. the currentPoint[1] gets never below 0 and the currentPoint[1] gets
never over member("map").width
2. the currentPoint[2] gets never below 0 and the currentPoint[2] gets
never over member("map").height

If you will be using 2 maps and swapping them from time to time than
make twice the same setup with the black box and the map next to it and
keep changing both regpoints at the same time. Then simply change the
member of the box sprite when you want to show the other map:

Example: 

--move left
currentPoint = member("map").regpoint
member("map").regpoint = point(currentPoint[1] ,
currentPoint[2]-1)--adjust the first map
member("map2").regpoint = point(currentPoint[1] ,
currentPoint[2]-1)--adjust the second map

--Swap maps, if the black boxes in the cast are called "window1" and
"window2" then

-- change to second map
 sprite(1).member = member "window2"

-- change back to first 
 sprite(1).member = member "window1"

That's it...hope it helps...

Good luck
 




-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Diego Landro
Sent: 29 August 2004 05:35
To: [EMAIL PROTECTED]
Subject: <lingo-l> Drawing curves on the fly



Dear colisters,
iīm working on a project i thought easy at first but got complicated as
some -i thought- easy thing to do became quite imposible. Hereīs the
thing. Iīm doing a project for a presentation that involves some map
drawings. Up to here easy. The problem is that as the presentation goes
on i have to "draw" roads on the map. I thought i could manage it with
some kind of mask. In adobe After effects itīs REALLY simple to do it.
You create a mask and you modify it through time so it gets the idea of
an animation. The idea is that i have two maps, onw with roads and onw
without and i thought Director should have some sort of masking like
after effects, but the only mask effect i could find was mask ink which
i canīt vary through time. I was unable to find an Xtra that would
provide me with such functionality. The issue is that i donīt know how
to do it easily without having to copy pixels in a really complicated
fashion with copypixel command. Is there an easy way iīm unable to find
-itīs almost 2am and ive been woring all day now- or is it not possible
to do such a thing on Director. Roads -obviously curves- should be drawn
as some "car" drives along them, so blending is out of the way. Well if
anyone has any ideas about this i would appreciate the comments im in a
blank here now, Thanks Diego Landro


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]).
Lingo-L is for learning and helping with programming Lingo.  Thanks!]




[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL 
PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping 
with programming Lingo.  Thanks!]

Reply via email to