A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [RESOLVED] Controlling main timeline in a movie clip

Hybrid View

  1. #1
    ___________________
    Join Date
    May 2004
    Posts
    3,174
    you can use events.

    in the main timeline, set up a listener:

    PHP Code:
    addEventListener("myEvent"handlerfalse0true);
    function 
    handler(event:Event):void{
      
    // react however you want...
      
    gotoAndPlay(32);

    then from the frame in the nested clip, dispatch that event:

    PHP Code:
    var e:Event = new Event("myEvent"true); // make sure it bubbles - 2nd argument should be "true"
    dispatchEvent(e); 
    i used simple string event-types here for simplicity; best-practice would be to use custom events.

  2. #2
    Junior Member
    Join Date
    Mar 2010
    Posts
    16
    Thank you, works perfectly.

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