Hi Everyone,
Im facing this small problem for which I haven’t been able to figure a solution. It would be of great help to know how to get it working.
I have a series of named and numbered movieclips on stage that require the same function to be called.
The following code works
ace1.addEventListener(MouseEvent.CLICK, goPage);
function goPage(event:MouseEvent)
{
trace("test");
}
But the following code gives the error
1120: Access of undefined property ace
var i =new Number(1);
ace*.addEventListener(MouseEvent.CLICK, goPage);
function goPage(event:MouseEvent)
{
trace("test");
}
Again in another example if I have another movieclip within ace1 and I try to assign the code to it as below. This works
var i =new Number(1);
ace1.base1.addEventListener(MouseEvent.CLICK, goPage);
function goPage(event:MouseEvent)
{
trace("test");
}
But if I try similar approach.
I get the error 1010: A term is undefined and has no properties
var i =new Number(1);
ace1.base*.addEventListener(MouseEvent.CLICK, goPage);
function goPage(event:MouseEvent)
{
trace("test");
}
Any suggestions and corrections are appreciated.
Thank you.