# Determine presence of loaded swf library object in array. Please HELP!

**URL:** https://forum.kirupa.com/t/determine-presence-of-loaded-swf-library-object-in-array-please-help/299249
**Category:** flash
**Created:** [November 2, 2009, 5:23am UTC](https://forum.kirupa.com/t/determine-presence-of-loaded-swf-library-object-in-array-please-help/299249 "2009-11-02T05:23:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Shaedo](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@Shaedo](https://forum.kirupa.com/u/Shaedo)
#### Post date: [November 2, 2009, 5:23am UTC](https://forum.kirupa.com/t/determine-presence-of-loaded-swf-library-object-in-array-please-help/299249/1 "2009-11-02T05:23:57Z")

</div>

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.

```auto
	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:

```auto
if(String(pa*)==('Page'))

```

but this would mean I need to parse out the ‘[object…]’ parts  
OR

```auto
if(String(pa*.constructor)==('Page'))

```

but that does not seem to work either.

Thank you for your consideration,

S.
