i am making a virtual tour for which i want to have the ability to control the map with buttons. i want to be able to zoom, pan, center and switch floors. i have the code figured out for all of those thanks to everyone who helped with the “object control” threads however i have run into a new problem for which i am in need of the groups expertise once again.
here it is:
the pan works fine within the bounds as does the zoom within its bounds … as one would expect … the problem comes, however, when i want the zoom and pan to interact. when a user zooms in on the map i would like them to be able to pan around it and with the bounds set as static values when the movie clip enlarges (zooms in) its already over those values so it does not move.
my question is can i set a dynamic variable that will define the bounds by which the map is constrained in its movement?
my code currently looks like this
on (press, keyPress “<Up>”) {
if (map.one._y<-125+map.one._height/2) {
map.one._y -= 10;
}
}
i would like to change it to something like the following
on (press, keyPress “<Up>”) {
if (map.one._y<mapwidth+map.one._height/2) {
map.one._y -= 10;
}
}
zbounds would equal the value _width or _height respectively.
how can i do this? please post an example if possible.
thanks so much