Hi,
My situation is this:
I have loaded swf with an object ‘Page’. A ‘Page’ object is created and a reference to it is added to an array ‘pa’.
I have a 2nd loaded swf that then has a reference to the ‘pa’ array (I don’t think this matters but I mention it just in case)
I want to cycle through the array and determine when I get to a Page object. Where I run into problems is trying to compile the class that does this.
private function CH(e:MouseEvent):void
{
trace(pa);//[object Image],[object Page],[object Blue],[object Red],[object Mask]
for(var i:uint=0;i<pa.length;i++)
{
if(pa*==(Page)) trace('Found page');//Error 1120: Access of undefined property Page.
}
}
Because there is no ‘Page’ object/class in the loaded swf it throws the error as commented in.
I thought I could do somthing like this:
if(String(pa*)==('Page'))
but this would mean I need to parse out the ‘[object…]’ parts
OR
if(String(pa*.constructor)==('Page'))
but that does not seem to work either.
Thank you for your consideration,
S.