PDA

View Full Version : center movieClip on screen..



lebonbon
September 22nd, 2009, 06:33 PM
allright, i need some help..

say i have a stage that is 2000 px high..
let's say there are buttons spread out from top to bottom and also,
lets say pressing anyone shows a related MC..
how do i make that MC center to the screen (not the stage)
wherever i may have scrolled to?

the only thing i have found after an extensive google session is some
vague tip about using externalInterface and retrieving the position of the
browsers native scroller from javaScrip ..but seems like a bit too much work, there's gotta be an easier way to do this.

any help appreciated. i'm a bit stuck here..
thanks /S

senocular
September 22nd, 2009, 06:49 PM
The only way to get screen coordinates is through javascript or in some way interacting with the container that would have that information. Flash does not. Otherwise you're left centering on the stage.

lebonbon
September 22nd, 2009, 06:55 PM
ah, *sigh*.. well, i guess i shall have to read up on that externalInterface component then..

if anyone has done anything similar.. any little piece of advice is welcome.

thanks /s