# Bizarre i've got weird problem

**URL:** <https://forum.kirupa.com/t/bizarre-ive-got-weird-problem/149796>\
**Category:** flash\
**Created:** [June 1, 2005, 1:06pm UTC](https://forum.kirupa.com/t/bizarre-ive-got-weird-problem/149796 "2005-06-01T13:06:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![spamtheman](https://avatars.discourse-cdn.com/v4/letter/s/779978/32.png) [@spamtheman](https://forum.kirupa.com/u/spamtheman)\
**Post date:** [June 1, 2005, 1:06pm UTC](https://forum.kirupa.com/t/bizarre-ive-got-weird-problem/149796/1 "2005-06-01T13:06:45Z")

</div>

i’ve got weird problem

**thisMc** is a global of where the sounds are held

i have a load of sounds in a file that are being called up  
They have been created with a specific target each and attached to the new sound object which is based in **thisMc**

If i run this script below everything works fine  
But if i then load it into another movie in the trace in the “**thisMc[newSndSay]**”  
it comes out as an object, so it knows it’s a sound object and says that properties are position, duration, etc… but these values come out undefined whereas they run fine when run just within itself

thisMc is a global of where the sounds are held

```auto
_global.sayAnimal=function(){
	var newSndSay = thisMc.sound_array[_global.goBackFrm-1][1];
	for(var x in thisMc[newSndSay]){
		trace("in = "+x);
		trace("in2 = "+thisMc[newSndSay][x]);
	}
	thisMc[newSndSay].start(0,1);
	pushSndSayPos = "no";
	_global.sndPlayin = "yes";
	
	var sndSayDur = thisMc[newSndSay].duration;
	thisMc.onEnterFrame = function() {
		if (thisMc[newSndSay].position == sndSayDur && pushSndSayPos == "yes") {
			_global.sndPlayin = "no";
			delete thisMc.onEnterFrame;
		}
		pushSndSayPos = "yes";
	}
}

```

anybody any clue?!?

Cheers  
andy
