onClipEvent(Load) Question

I have a movie with one layer and two keyframes.\rOn the first keyframe is a movieclip (instance name ‘MC’)\rwith the following actionscript\r\ronClipEvent (load) {\r&nbsp &nbsp &nbsp &nbsp xyz = 5;\r trace(xyz);\r}\r\rThe second keyframe is empty but holds the actionscript:\r\r_root.MC.xyz = 10;\rtrace(_root.MC.xyz);\r\r\rmy question is when i test the movie … why does the trace action constantly ouput 5s ?? shouldnt it output 5 once and then costantly output 10s? because isnt a movieclip only loaded once??\r\rbit confused here…any help appreciated…thanks

you have two frames on the main timeline, so it will loop and continue referencing frame 1

yes but when the playhead goes over frame 2, why doesnt it change the variable to 10?\r\rand another thing is- isnt a movie clip only loaded once? i.e not everytime the playhead moves over it?\r\rcheers

because the second frame is empty (the movie doesn’t exist), when the playhead moves back to one, the movie is loaded, and the load event fires again.\r\rtry putting the frame actions on one level in frame 2, and the clip on another level which spans both frames. then you’ll get the result you’re expecting.