A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Control a MC onstage from within another MC?

  1. #1
    Junior Member
    Join Date
    Oct 2008
    Posts
    10

    Control a MC onstage from within another MC?

    I want to control (i.e. play) a movieclip that's located on the stage from within another movieclip. The structure is basically like this...

    Stage
    movieclip (mc)
    stop script
    animation
    movieclip (bt2)
    actionscript layer (code below)
    button (bt)

    the code within bt2 is:
    Code:
    bt.addEventListener(MouseEvent.CLICK, onPlayClick);
    function onPlayClick(event:MouseEvent):void 
    {_root.mc.play();}
    Obviously, it's not working, but I don't know what I'm doing wrong. Can anyone help?

  2. #2
    Junior Member
    Join Date
    Jun 2009
    Posts
    22
    as2?

    try replacing CLICK with onRelease

  3. #3
    Junior Member
    Join Date
    Oct 2008
    Posts
    10
    no, as3

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