A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Calling MC within MC

  1. #1
    Degenerate and baise art thou. docree's Avatar
    Join Date
    Feb 2001
    Location
    USA
    Posts
    390

    Calling MC within MC

    I'm so close to getting an actionscripted project done.
    But, I have a couple questions...

    How would I call/target a movieclip within a movieclip from an actionscript on the root movie?

    How does one center a movieclip in actionscript?

    I seem to be running in circles.
    _________________________
    DocRee

    FYI:The project is my version of the "raycasting" engine I mentioned in the "game pad" post.

  2. #2
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    Referring to a movieclip
    code:
    _root.rootChild.childOfRootChild._x = 5



    Centering a movieclip
    code:
    myMc._x = Stage.width / 2
    myMC._y = Stage.height / 2


  3. #3
    Degenerate and baise art thou. docree's Avatar
    Join Date
    Feb 2001
    Location
    USA
    Posts
    390
    Thanks, that works to an extent...
    When centering a MC within MC it references close to the center, but not close enough.
    Right now, it is just about 10 pixels [40 fips] left and up from center.
    Is it possible that it is referencing around the center point of itself?
    I have the cross hair at the uper left corner of the child mc and parent mc.
    DocRee

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