Hi,
I have a problem where I have implemented a 3D cube and an intro
sequence which can be seen here:
http://glenpike.co.uk/fitkin/_index.php
My problem is that I had to calculate the initial positions of the
zoomed in cube by using sliders to tweak the value then hardcoding them...
I (and the client) would like the Flash to fill the screen 100%, so
that the cube is centred, but this means that I need to calculate the
start position so the "G" of the logo fills the screen and calculate the
zoomed in position of the so that the cube lines up - these points are
relative to the browser top-left rather than the world 0,0 which needs
to be taken into account...
I think I can do this with 3D projection calcs, but can't work out
how to do it or find some nice and simple explanations online. So if
anyone has any tips / pointers, I would be greatful...
The figures are so:
SWF size 800 x 600, so centre is 400 x 300.
The Cube is 600 x 600 x 600 with the logo @ -295, 295 (0,0,0 is the
cube centre)
At "zoomed out" it is at 0, 0, 3000, scaled to 1.0
At the beginning of the intro, it is @ 1025, -1023, 48, scaled to 3.89
Zoomed in it is @ 827, 794, 200, scaled to 3
So what I would like to do is work out x, y & z for the intro and
zoomed in position for an arbitrary screen size with the world 0, 0
centred in the middle of the screen...
Thanks in advance for any help.
Glen
--
Glen Pike
01326 218440
www.glenpike.co.uk <http://www.glenpike.co.uk>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders