Hi,
I'm having some difficulty with some code. I have an object (instance name my_ssp) that is in a movie clip (instance name gallery). That movie clip is nested in another move clip (instance name pages). The pages mc resides on a layer on the main timeline. Using CS3 I'm publishing the swf to have flash - full screen enabled and I'm trying to reposition the object (my_ssp) within the gallery mc to 0,0 however it doesn't seem to see that nested gallery movieclip.
Below is my code that i'm using to access that object:
Code:
Stage.align="TL";
Stage.scaleMode="noScale";
var origX:Number = _root.pages.gallery._x;
var origY:Number = _root.pages.gallery._y;
var origPagesX:Number = _root.pages._x;
var origPagesY:Number = _root.pages._y;
listenerObject = new Object();
listenerObject.onFullScreenChange = function(eventObject):Void {
if (eventObject.data == "fullScreen") {
_root.pages.gallery._x = 0;
_root.pages.gallery._y = 0;
_root.pages._x = 0;
_root.pages._y = 0;
} else if (eventObject.data == "normal") {
_root.pages.gallery._x = origX;
_root.pages.gallery._y = origY;
_root.pages._x = origPagesX;
_root.pages._y = origPagesY;
}
}
_root.pages.gallery.my_ssp.addEventListener("onFullScreenChange", listenerObject);
The above code doesn't work. My swf does resize to full screen but the gallery mc doesn't reposition to 0,0 on the stage for whatever reason.
I can remove all the code except the follow two lines and get the same result as with the extended code i posted above.
Code:
Stage.align="TL";
Stage.scaleMode="noScale";
I suspect this might be an issue with my paths, not being correct. I really don't know.
Can anyone shed some light on this for me?
thanks!