clemtinite
Programmer
OK, here we go.
I have a Man movie clip which can be moved left or right with the directional keys.
When a Ladder movie cilp hit tests with the man, a variable '_root.Man.climbup' is returned true. This allows the man to 'climb' using the up and down directional keys and stops him from walking with the right and left directional keys.
This ladder movie clip is self contained and is only ever referred to as 'this' (by itself). This means in theory (to me) that since the '_root.Man.climbup' variable is contained in '_root.Man' as opposed to the (instance nameless) ladder, multiple copies of the ladder could be made with no extra programming neccassary.
What actually happens is that the man is only able to climb the one original ladder. I have traced this down to the fact that '_root.Man.climbup' is never returned true by the other ladders. I've even edited the base programming of the ladders so that they control a seperate movie clip which deals with the variables itself (there are no copies of this movie clip), but even that doesn't work!
CORE PROBLEM: The completely self sustained* movie clip A (A clone of movie clip C) cannot control movie clip Bs variable while the original and self sustained* movie clip C can.
* (By self sustained I mean that it holds no variables of it's own and therefor is only referred to by itself).
I'm lost, could anybody help? It'd be much appreciated!
- clemtinite
I have a Man movie clip which can be moved left or right with the directional keys.
When a Ladder movie cilp hit tests with the man, a variable '_root.Man.climbup' is returned true. This allows the man to 'climb' using the up and down directional keys and stops him from walking with the right and left directional keys.
This ladder movie clip is self contained and is only ever referred to as 'this' (by itself). This means in theory (to me) that since the '_root.Man.climbup' variable is contained in '_root.Man' as opposed to the (instance nameless) ladder, multiple copies of the ladder could be made with no extra programming neccassary.
What actually happens is that the man is only able to climb the one original ladder. I have traced this down to the fact that '_root.Man.climbup' is never returned true by the other ladders. I've even edited the base programming of the ladders so that they control a seperate movie clip which deals with the variables itself (there are no copies of this movie clip), but even that doesn't work!
CORE PROBLEM: The completely self sustained* movie clip A (A clone of movie clip C) cannot control movie clip Bs variable while the original and self sustained* movie clip C can.
* (By self sustained I mean that it holds no variables of it's own and therefor is only referred to by itself).
I'm lost, could anybody help? It'd be much appreciated!
- clemtinite