Hello guys,
Would someone be kind to solve my two little problems please?
Thank you!!
First, I have a problem accessing the .x of an Sprite inside a class I made.
I have class A which in his constructor I have three addChild(B), then in class B’s constructor I have addChild(sprite_C).
So, in a function in class B I want to get the .x of the others sprites in the others classes B.
The code I have in that function inside B now is this but its not working
c=0;
while (c<parent.numChildren) {
trace(parent.getChildAt©.sprite_C.x);
c=c+1;
}
The second problem may be an easy one for you.
Why with this code inside my button class my program just jumps to frame 3 when I push my button?
public function on_Release(e:Event) {
if (MovieClip(root).currentFrame == 1){
MovieClip(root).gotoAndStop(2);
}
if (MovieClip(root).currentFrame == 2){
MovieClip(root).gotoAndStop(3);
}
}
Thanks in advance !
;;