A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [RESOLVED] calling movieclip as3

  1. #1
    Junior Member
    Join Date
    Jul 2010
    Posts
    13

    resolved [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

  2. #2
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    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.

  3. #3
    Junior Member
    Join Date
    Jul 2010
    Posts
    13
    thnks!!!

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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center