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
_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