0
votes

i have 2 movieclip on different frames of main timeline . im trying to move in different frame of timeline(from index to page c11) and call a function in the second movieclip . when i use code in main timeline using a bottom it work good

gotoAndPlay("c11");
aks1.aks2.c1Load();

but when i use it in another movieclip like this

MovieClip(parent).gotoAndPlay("c11");
MovieClip(parent).aks1.aks2.c1Load();

the function c1Load() dosent start . i dont get any error but this is displayed TypeError: Error #1009: Cannot access a property or method of a null object reference. at fan_fla::hand_3/frame184()

p.s i need to run it after the last frame of first movieclip

update : i have a main timline with 2 lables "index" and "c11" . symbol "hand" is on frame "index" and symbol "aks1" on frame "c11" . i can call function aks1.aks2.c1Load(); from main timline using botton but when i call it from last frame of "fin" it dont work .

1
Timeline MovieClip's are only accessible on the frames where they exist and have instance names. So if whatever frame that code is on doesn't have asks1 on the timeline with the proper instance name, it will be null - BadFeelingAboutThis
plz ad post so i can check as answer - ssg

1 Answers

0
votes

it seems that i cant call a function in a symbol from another symbol . so i added an invisible bottom to main timeline and write the needed code then called it from movieclip like this

MovieClip(parent).p12(null);

in botoom click function is this code

aks1.aks2.c1Load();

the problem is solved but in theory firs code should work too . and its not a good way to solve it . edit: i think found the problem . bottom in main timelin is on a layer that exist in both keyframes . that is why it work sorry for my bad en