I’m really frustrated because I spent about 4 hours trying to solve a problem that appears to be SO SIMPLE! But i can’t do it. I’ve tried everything.
I have attached a copy of the flash file at the bottom of this post… You can view it with flash mx 2004. Anyway, it’s a rough “map” of my school campus with various buildings.
I made a “school” movieclip and inside it I put the various buildings (movieclips)… I designed a set of functions to make it scroll around and a tooltip to appear once I roll-over each of the buildings.
So I wanted to make it so that it zooms onto the desired building once I click on it… but I’m having problems with setting the _x and _y coordinates of the “school” movieclip so that the building which in this case is called “isc” is in the center of the page.
I only applied the function to the isc building to test it out… It starts when you see this code:
school.isc.onPress=function(){
delete moveTooltip.onEnterFrame
delete school.onEnterFrame
var gx=school._x
var gy=school._y
var six=school.isc._x
var siy=school.isc._y
ft=true
school.onEnterFrame=function(){
zoomIn(gx,gy,six,siy)
trace(center.x-(gx+six))
}
}
The more I think about this problem… The worse I get. So I’ll leave it to people who have a fresh mind and can figure it out. Coz, I’m just digging my own grave from here. I just don’t see what I’m doing wrong.
Thanks.