dmk
June 17th, 2009, 02:35 AM
Hi All,
I'm currently having a little trouble in a project where I have the following occuring:
preloader.swf --- loads 2x --- homepage.swf --- can load --- products.swf
When the products.swf is loaded, the starting animation occurs as expected and is displayed on the screen without an issue. However, I can't interact with any of the buttons contained in the products.swf.
The products page works like an overlay over the top, and the homepage.swf contains an background which can be clicked on to close the overlay. If you click on the products.swf it reacts as if the background was clicked, which it shouldnt as the products.swf is located on top of the background.
I have already checked the obvious parts, and am ensuring that products.swf is located at numChildren-1, so nothing is getting in the way.
The catch is that everything was working fine when the code was internal to the fla, and now as soon as I moved the code to an external .as file nothing works.
I am using the same way of loading the products.swf as I am loading the homepage.swf, which looks like:
var productsLoader:Loader = new Loader();
productsLoader.contentLoaderInfo.addEventListener( Event.COMPLETE, onProductsCompleteHandler);
productsLoader.load(new URLRequest("products.swf"));
onProductsCompleteHandler:
_productsOverlay = e.target.content;
_productsOverlay.x = 29;
_productsOverlay.y = 56;
addChildAt(_productsOverlay, numChildren - 1);
animateOverlayBackgroundIn();
_productsOverlay.SetupProduct(...
Any help would be greatly appreciated.
Cheers,
Damian
I'm currently having a little trouble in a project where I have the following occuring:
preloader.swf --- loads 2x --- homepage.swf --- can load --- products.swf
When the products.swf is loaded, the starting animation occurs as expected and is displayed on the screen without an issue. However, I can't interact with any of the buttons contained in the products.swf.
The products page works like an overlay over the top, and the homepage.swf contains an background which can be clicked on to close the overlay. If you click on the products.swf it reacts as if the background was clicked, which it shouldnt as the products.swf is located on top of the background.
I have already checked the obvious parts, and am ensuring that products.swf is located at numChildren-1, so nothing is getting in the way.
The catch is that everything was working fine when the code was internal to the fla, and now as soon as I moved the code to an external .as file nothing works.
I am using the same way of loading the products.swf as I am loading the homepage.swf, which looks like:
var productsLoader:Loader = new Loader();
productsLoader.contentLoaderInfo.addEventListener( Event.COMPLETE, onProductsCompleteHandler);
productsLoader.load(new URLRequest("products.swf"));
onProductsCompleteHandler:
_productsOverlay = e.target.content;
_productsOverlay.x = 29;
_productsOverlay.y = 56;
addChildAt(_productsOverlay, numChildren - 1);
animateOverlayBackgroundIn();
_productsOverlay.SetupProduct(...
Any help would be greatly appreciated.
Cheers,
Damian