-
[RESOLVED] calling movieclip as3
i have a movieclip on stage having instance name 'a_mc'
there is another movieclip inside movieclip 'a_mc' placed on frame 20 of 'a_mc'
which has instance name 'b_mc'
how do i call movieclip 'b_mc' from my main timeline using action script 3
for eg i do this.. a_mc.b_mc.x = 500;
this is returning a error now
"TypeError: Error #1010: A term is undefined and has no properties.
at Untitled_fla::MainTimeline/frame1()"
this method only seems to work when i place 'b_mc' at first frame
-
Flash/Flex Developer
That is because the movieclip doesn't exist at the beginning of the parent movieclip. If you don't want an MC to appear until after a specific frame, but want control outside of the clip, the better option, if you are not going to instantiate it via code, would be to change the visible status to false and make sure it is available from frame one. Then on frame 20, proceed with the movement you want.
Or you can have actionscript, create the movieclip (from the library) and proceed with your code.
Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.
-
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|