A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: AS3 Button function controling another movieclips timeline.

  1. #1
    Junior Member
    Join Date
    Nov 2010

    AS3 Button function controling another movieclips timeline.

    Hello all,

    I am new to AS3 and have a problem that I need some guidance on.

    What I am trying to achieve is have one movie clip containing a button control the timeline of another movie clip.
    I know how to get a button to control the timeline of it's current movie clip, however, getting a button to control the timeline of a seperate clip seems to evade me.

    If there is a tutorial that someone knows of, or if someone could post a snippet of AS3 showing how a button controls another clips timeline -- this would be appreciated alot.

    Re: Question: AS3 Button controling timeline of movie clip.

    here is the coding I am using too:

    but_shows.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);

    function onMouseDown(event:MouseEvent):void{



    it says that I have an error:

    Symbol 'ribbon_menu', Layer 'actions', Frame 1, Line 20 1120: Access of undefined property _root.

    but_shows is located in a movie clip called Ribbon_menu that is trying to go to and play x fram in a movieclip called mainContainer.

    Both Ribbon_menu and mainContainer are located on the root timeline.

    I wonder since the button scripting is located in Ribbon_menu and not the main timeline is the _root command confusing itself with the root of the stage, or the stage of the ribbon_menu movieclip!

    Thanks in advanced,

  2. #2
    flash grasshopper
    Join Date
    Feb 2005
    Hey yo, _root no longer exists in AS3.0. The equivalent (sort of) is root or stage, but you probably want to access the other movieclip using parent.

    Check out this thread for more detailed info: http://board.flashkit.com/board/showthread.php?t=776658.

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