I've got a movieclip that has some various functions declared inside of it like init(), etc...those work great. Then inside of that movieclip I have another movieclip called topBar and it has it's own functions like initBar(). Those do NOT work. In the first movieclip if I do: topBar.initBar(); it just simply does not work at all. Why would it not recoginze functions declared in that 2nd movieclip? I declare the functions like this: initBar = function() { blah...} and I've even tried: this.initBar = function() { blah... } and neither work. why? -Jason Kringen
have you tried keeping all functions on the main timeline ? the first clip action would then be - _parent.init(); and the nested clip - _parent._parent.initBar(); my2c's regards
It is a matter of path for sure. The player doesn't find the function when you call it. Try to add some trace or see the list of objects/variables in the plyer IDE (see debug menu).
ok. I'll try maybe putting them on the main timeline and see how that effects things. I just think it's strange that I can declare functions in one movie clip that work fine, but then in another, they won't work at all. Is that a common problem when you have a movie nested inside of another movie? -Jason
When you have a mc nested in another one usually mistakes are in the way you refer to object (because even functions are a type of object). One way to discover where functions/objects are is to trace them or locate them by means of List objects/variables. -c.
Don't see what you're looking for? Try a search.
|