开发者

Can't access into other movieclip

I can't access in other movieclips, for example I have my sections "home", "about", "contact" and the labels in the sections.

When I go inside about and call the contact section to set the text for example _p开发者_如何学JAVAarent.instancename(contact).title.text = "TEST", I call this inside the about section but it doesn't work.

I put all the sections inside one movieclip called sections and inside the movieclip I have the labels for each section for example:

Layer 1 - actions (stops);

Layer 2 - labels (home, about, contact);

Layer 3 - movieclips (ho, ab, co);


As John Giotta said in his comment: When you change the frame by calling gotoAndPlay ("Framelabel"), all the elements in the frame you were in before are erased from memory. So there will not be anything to access, when you try to change the text.

One way to do it is to put all your elements into separate MovieClips and place them in the same frame on the timeline, setting the active element to visible = true; and the others to visible = false; instead of jumping to another frame, when a button is clicked. That way, you can access everything from everywhere, and your site will look just the same.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜